600 |
I am using Layout property to sort multiple columns at once. The problem is that all items get expanded. How do I prevent that
Tree1->BeginUpdate(); Tree1->LinesAtRoot = Extreelib_tlb::LinesAtRootEnum::exLinesAtRoot; Extreelib_tlb::IColumnPtr var_Column = Tree1->Columns->Add(L"P1"); var_Column->set_Def(Extreelib_tlb::DefColumnEnum::exCellHasCheckBox,TVariant(true)); var_Column->PartialCheck = true; Extreelib_tlb::IColumnPtr var_Column1 = Tree1->Columns->Add(L"P2"); var_Column1->set_Def(Extreelib_tlb::DefColumnEnum::exCellHasCheckBox,TVariant(true)); var_Column1->PartialCheck = true; var_Column1->FormatColumn = L"1 index ``"; Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; long h = var_Items->AddItem(TVariant("Root")); var_Items->InsertItem(h,TNoParam(),TVariant("Child A")); var_Items->InsertItem(h,TNoParam(),TVariant("Child B")); var_Items->InsertItem(h,TNoParam(),TVariant("Child A")); var_Items->InsertItem(h,TNoParam(),TVariant("Child B")); var_Items->AddItem(TVariant("Root")); var_Items->AddItem(TVariant("Root")); Tree1->SingleSort = false; Tree1->Layout = L"multiplesort=\"C0:1 C1:2\";collapse=\"\""; Tree1->EndUpdate(); |
599 |
How can I get ride / hide the image being dragged by OLE Drag and Drop
// OLEStartDrag event - Occurs when the OLEDrag method is called. void __fastcall TForm1::Tree1OLEStartDrag(TObject *Sender,Extreelib_tlb::IExDataObject *Data,long * AllowedEffects) { // Data.SetData("data to drag") AllowedEffects = 1; } Tree1->OLEDropMode = Extreelib_tlb::exOLEDropModeEnum::exOLEDropManual; Tree1->Background[Extreelib_tlb::BackgroundPartEnum::exDragDropAfter] = RGB(255,255,255); Tree1->LinesAtRoot = Extreelib_tlb::LinesAtRootEnum::exLinesAtRoot; Tree1->Columns->Add(L"Default"); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; long h = var_Items->AddItem(TVariant("Root")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 1")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 2")); var_Items->set_ExpandItem(h,true); |
598 |
How can I export checked items only
Tree1->BeginUpdate(); Tree1->MarkSearchColumn = false; Extreelib_tlb::IColumnsPtr var_Columns = Tree1->Columns; var_Columns->Add(L"C1")->set_Def(Extreelib_tlb::DefColumnEnum::exCellHasCheckBox,TVariant(true)); var_Columns->Add(L"C2")->FormatColumn = L"1 index `A-Z`"; var_Columns->Add(L"C3")->FormatColumn = L"100 index ``"; Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->AddItem(TVariant("Item 1")); var_Items->set_CellState(TVariant(var_Items->AddItem(TVariant("Item 2"))),TVariant(0),1); var_Items->set_CellState(TVariant(var_Items->AddItem(TVariant("Item 3"))),TVariant(0),1); Tree1->EndUpdate(); OutputDebugString( L"Export CSV Checked Items Only:" ); OutputDebugString( PChar(Tree1->Export(TVariant(""),TVariant("chk"))) ); |
597 |
How can I export a hidden column
Tree1->BeginUpdate(); Tree1->MarkSearchColumn = false; Extreelib_tlb::IColumnsPtr var_Columns = Tree1->Columns; var_Columns->Add(L"C1"); Extreelib_tlb::IColumnPtr var_Column = var_Columns->Add(L"C2"); var_Column->FormatColumn = L"1 index `A-Z`"; var_Column->Visible = false; Extreelib_tlb::IColumnPtr var_Column1 = var_Columns->Add(L"C3"); var_Column1->FormatColumn = L"100 index ``"; var_Column1->Visible = false; Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->AddItem(TVariant("Item 1")); var_Items->AddItem(TVariant("Item 2")); var_Items->AddItem(TVariant("Item 3")); Tree1->EndUpdate(); OutputDebugString( L"Export CSV Hidden Columns (1,2):" ); OutputDebugString( PChar(Tree1->Export(TVariant(""),TVariant("|1,2"))) ); |
596 |
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 3)
Tree1->BeginUpdate(); Tree1->LinesAtRoot = Extreelib_tlb::LinesAtRootEnum::exLinesAtRoot; Tree1->DrawGridLines = Extreelib_tlb::GridLinesEnum::exRowLines; Tree1->AutoDrag = Extreelib_tlb::AutoDragEnum::exAutoDragPositionAny; Tree1->HasLines = Extreelib_tlb::HierarchyLineEnum::exSolidLine; Tree1->Indent = 16; Tree1->MarkSearchColumn = false; Extreelib_tlb::IColumnsPtr var_Columns = Tree1->Columns; Extreelib_tlb::IColumnPtr var_Column = var_Columns->Add(L""); var_Column->set_Def(Extreelib_tlb::DefColumnEnum::exCellCaptionFormat,TVariant(1)); var_Column->FormatColumn = L"((1:=(0 :=(1 rpos '.|A-Z||a-z|')) rfind `.`) < 0 ? `<b>` + =:0 + `` : (=:0 mid (1 + 1 + =:1) ) + `)` ) + ` ` + value"; Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; long h = var_Items->AddItem(TVariant("Root")); var_Items->InsertItem(h,TNoParam(),TVariant("Child")); long hChild = var_Items->InsertItem(h,TNoParam(),TVariant("Child")); var_Items->InsertItem(hChild,TNoParam(),TVariant("Child")); var_Items->InsertItem(hChild,TNoParam(),TVariant("Child")); var_Items->InsertItem(hChild,TNoParam(),TVariant("Child")); var_Items->InsertItem(h,TNoParam(),TVariant("Child")); var_Items->set_ExpandItem(0,true); h = var_Items->AddItem(TVariant("Root")); var_Items->InsertItem(h,TNoParam(),TVariant("Child")); hChild = var_Items->InsertItem(h,TNoParam(),TVariant("Child")); var_Items->set_CellState(TVariant(hChild),TVariant(0),1); var_Items->InsertItem(hChild,TNoParam(),TVariant("Child")); var_Items->InsertItem(hChild,TNoParam(),TVariant("Child")); var_Items->InsertItem(hChild,TNoParam(),TVariant("Child")); var_Items->InsertItem(h,TNoParam(),TVariant("Child")); Tree1->EndUpdate(); |
595 |
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 2)
Tree1->BeginUpdate(); Tree1->LinesAtRoot = Extreelib_tlb::LinesAtRootEnum::exLinesAtRoot; Tree1->GridLineColor = RGB(190,190,190); Tree1->DrawGridLines = Extreelib_tlb::GridLinesEnum::exRowLines; Tree1->AutoDrag = Extreelib_tlb::AutoDragEnum::exAutoDragPositionAny; Tree1->HasLines = Extreelib_tlb::HierarchyLineEnum::exSolidLine; Tree1->Indent = 16; Extreelib_tlb::IColumnsPtr var_Columns = Tree1->Columns; var_Columns->Add(L"Default"); Extreelib_tlb::IColumnPtr var_Column = var_Columns->Add(L""); var_Column->set_Def(Extreelib_tlb::DefColumnEnum::exCellCaptionFormat,TVariant(1)); var_Column->set_Def(Extreelib_tlb::DefColumnEnum::exCellPaddingRight,TVariant(4)); var_Column->AllowSizing = false; var_Column->Width = 36; var_Column->Position = 0; var_Column->FormatColumn = TVariant(String("(1:=(0 :=(1 rpos '.|A-Z||a-z|')) rfind `.`) < 0 ? `<b>` + =:0 : (`............` left 2 * (=:0 count `.`)) + (=:0 mid (1 + 1 + =") + ":1) ) "); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; long h = var_Items->AddItem(TVariant("Root")); var_Items->InsertItem(h,TNoParam(),TVariant("Child")); long hChild = var_Items->InsertItem(h,TNoParam(),TVariant("Child")); var_Items->InsertItem(hChild,TNoParam(),TVariant("Child")); var_Items->InsertItem(hChild,TNoParam(),TVariant("Child")); var_Items->InsertItem(hChild,TNoParam(),TVariant("Child")); var_Items->InsertItem(h,TNoParam(),TVariant("Child")); var_Items->set_ExpandItem(0,true); h = var_Items->AddItem(TVariant("Root")); var_Items->InsertItem(h,TNoParam(),TVariant("Child")); hChild = var_Items->InsertItem(h,TNoParam(),TVariant("Child")); var_Items->set_CellState(TVariant(hChild),TVariant(0),1); var_Items->InsertItem(hChild,TNoParam(),TVariant("Child")); var_Items->InsertItem(hChild,TNoParam(),TVariant("Child")); var_Items->InsertItem(hChild,TNoParam(),TVariant("Child")); var_Items->InsertItem(h,TNoParam(),TVariant("Child")); Tree1->EndUpdate(); |
594 |
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 1)
Tree1->BeginUpdate(); Tree1->LinesAtRoot = Extreelib_tlb::LinesAtRootEnum::exLinesAtRoot; Tree1->DrawGridLines = Extreelib_tlb::GridLinesEnum::exRowLines; Tree1->AutoDrag = Extreelib_tlb::AutoDragEnum::exAutoDragPositionAny; Tree1->HasLines = Extreelib_tlb::HierarchyLineEnum::exSolidLine; Tree1->Indent = 16; Extreelib_tlb::IColumnsPtr var_Columns = Tree1->Columns; var_Columns->Add(L"Default"); Extreelib_tlb::IColumnPtr var_Column = var_Columns->Add(L""); var_Column->set_Def(Extreelib_tlb::DefColumnEnum::exCellCaptionFormat,TVariant(1)); var_Column->set_Def(Extreelib_tlb::DefColumnEnum::exCellPaddingRight,TVariant(4)); var_Column->Alignment = Extreelib_tlb::AlignmentEnum::RightAlignment; var_Column->AllowSizing = false; var_Column->Width = 24; var_Column->Position = 0; var_Column->FormatColumn = L"(1:=(0 :=(1 rpos '.|A-Z||a-z|')) rfind `.`) < 0 ? `<b>` + =:0 : `<i>` + (=:0 mid (1 + 1 + =:1) ) "; Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; long h = var_Items->AddItem(TVariant("Root")); var_Items->InsertItem(h,TNoParam(),TVariant("Child")); long hChild = var_Items->InsertItem(h,TNoParam(),TVariant("Child")); var_Items->InsertItem(hChild,TNoParam(),TVariant("Child")); var_Items->InsertItem(hChild,TNoParam(),TVariant("Child")); var_Items->InsertItem(hChild,TNoParam(),TVariant("Child")); var_Items->InsertItem(h,TNoParam(),TVariant("Child")); var_Items->set_ExpandItem(0,true); h = var_Items->AddItem(TVariant("Root")); var_Items->InsertItem(h,TNoParam(),TVariant("Child")); hChild = var_Items->InsertItem(h,TNoParam(),TVariant("Child")); var_Items->set_CellState(TVariant(hChild),TVariant(0),1); var_Items->InsertItem(hChild,TNoParam(),TVariant("Child")); var_Items->InsertItem(hChild,TNoParam(),TVariant("Child")); var_Items->InsertItem(hChild,TNoParam(),TVariant("Child")); var_Items->InsertItem(h,TNoParam(),TVariant("Child")); Tree1->EndUpdate(); |
593 |
Is it possible to have a different alignment for parts of the cell's caption
Tree1->BeginUpdate(); Tree1->TreeColumnIndex = -1; Tree1->DrawGridLines = Extreelib_tlb::GridLinesEnum::exRowLines; Extreelib_tlb::IColumnPtr var_Column = Tree1->Columns->Add(L"Default"); var_Column->set_Def(Extreelib_tlb::DefColumnEnum::exCellHasCheckBox,TVariant(true)); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->set_CellHAlignment(TVariant(var_Items->AddItem(TVariant("all-left"))),TVariant(0),Extreelib_tlb::AlignmentEnum::LeftAlignment); var_Items->set_CellHAlignment(TVariant(var_Items->AddItem(TVariant("all-center"))),TVariant(0),Extreelib_tlb::AlignmentEnum::CenterAlignment); var_Items->set_CellHAlignment(TVariant(var_Items->AddItem(TVariant("all-right"))),TVariant(0),Extreelib_tlb::AlignmentEnum::RightAlignment); long h = var_Items->AddItem(TVariant("left<c>center<r>right")); var_Items->set_CellCaptionFormat(TVariant(h),TVariant(0),Extreelib_tlb::CaptionFormatEnum::exHTML); Tree1->EndUpdate(); |
592 |
I have a column with Def(exCellSingleLine) property on False, word-wrapping, and I am wondering if possible to update the column's content while user is resizing it
Tree1->BeginUpdate(); Extreelib_tlb::IColumnsPtr var_Columns = Tree1->Columns; Extreelib_tlb::IColumnPtr var_Column = var_Columns->Add(L"MultipleLine"); var_Column->Width = 32; var_Column->set_Def(Extreelib_tlb::DefColumnEnum::exCellSingleLine,TVariant(false)); var_Column->set_Def(Extreelib_tlb::DefColumnEnum::exColumnResizeContiguously,TVariant(true)); Extreelib_tlb::IColumnPtr var_Column1 = var_Columns->Add(L"SingleLine"); var_Column1->set_Def(Extreelib_tlb::DefColumnEnum::exCellSingleLine,TVariant(false)); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->set_CellCaption(TVariant(var_Items->AddItem(TVariant("This is a bit of long text that should break the line"))),TVariant(1),TVariant("This is a bit of long text that should break the line")); Tree1->EndUpdate(); |
591 |
How do I sort the index column as numeric
// AddItem event - Occurs after a new Item has been inserted to Items collection. void __fastcall TForm1::Tree1AddItem(TObject *Sender,Extreelib_tlb::HITEM Item) { Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->set_CellData(TVariant(Item),TVariant(1),TVariant(var_Items->get_ItemToIndex(Item))); } Tree1->BeginUpdate(); Tree1->DrawGridLines = Extreelib_tlb::GridLinesEnum::exAllLines; Tree1->ColumnAutoResize = true; Tree1->ShowFocusRect = false; Extreelib_tlb::IColumnPtr var_Column = Tree1->Columns->Add(L"Next"); var_Column->set_Def(Extreelib_tlb::DefColumnEnum::exCellPaddingLeft,TVariant(4)); var_Column->set_Def(Extreelib_tlb::DefColumnEnum::exHeaderPaddingLeft,TVariant(4)); Extreelib_tlb::IColumnPtr var_Column1 = Tree1->Columns->Add(L"Index"); var_Column1->AllowSizing = false; var_Column1->Width = 48; var_Column1->FormatColumn = L"(((0 := (1 index ``)) mod 3) case ( default: ``; 0 : `<r><fgcolor=B0B0B0>`; 1: ``; 2 : `<c><fgcolor=808080>` )) + str(=:0)"; var_Column1->set_Def(Extreelib_tlb::DefColumnEnum::exCellCaptionFormat,TVariant(1)); var_Column1->SortType = Extreelib_tlb::SortTypeEnum::SortUserData; var_Column1->Position = 0; Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->AddItem(TVariant("Item 1")); var_Items->AddItem(TVariant("Item 2")); var_Items->AddItem(TVariant("Item 3")); var_Items->AddItem(TVariant("Item 4")); var_Items->AddItem(TVariant("Item 5")); var_Items->AddItem(TVariant("Item 6")); var_Items->AddItem(TVariant("Item 7")); var_Items->AddItem(TVariant("Item 8")); var_Items->AddItem(TVariant("Item 9")); var_Items->AddItem(TVariant("Item 10")); Tree1->EndUpdate(); |
590 |
How can I put icons/images into buttons
Tree1->BeginUpdate(); Tree1->ColumnAutoResize = true; Tree1->Images(TVariant(String("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") + "lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" + "0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")); Extreelib_tlb::IColumnPtr var_Column = Tree1->Columns->Add(L"C+B"); var_Column->AllowSizing = false; var_Column->Width = 48; var_Column->FormatColumn = L"` <img>` + ( 1 + (1 index ``) mod 3 ) + `</img> `"; var_Column->set_Def(Extreelib_tlb::DefColumnEnum::exCellCaptionFormat,TVariant(1)); var_Column->set_Def(Extreelib_tlb::DefColumnEnum::exCellHasCheckBox,TVariant(true)); var_Column->set_Def(Extreelib_tlb::DefColumnEnum::exCellHasButton,TVariant(true)); var_Column->set_Def(Extreelib_tlb::DefColumnEnum::exCellButtonAutoWidth,TVariant(true)); Tree1->Columns->Add(L""); Tree1->DrawGridLines = Extreelib_tlb::GridLinesEnum::exVLines; Tree1->DefaultItemHeight = 20; Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->AddItem(TVariant("")); var_Items->AddItem(TVariant("")); var_Items->AddItem(TVariant("")); var_Items->AddItem(TVariant("")); var_Items->AddItem(TVariant("")); var_Items->AddItem(TVariant("")); var_Items->AddItem(TVariant("")); var_Items->AddItem(TVariant("")); Tree1->EndUpdate(); |
589 |
Is it possible to have a CheckBox and Button TOGETHER on all cells in a column
// CellButtonClick event - Fired after the user clicks on the cell of button type. void __fastcall TForm1::Tree1CellButtonClick(TObject *Sender,Extreelib_tlb::HITEM Item,long ColIndex) { OutputDebugString( L"CellButtonClick" ); OutputDebugString( L"Item" ); } // CellStateChanged event - Fired after cell's state has been changed. void __fastcall TForm1::Tree1CellStateChanged(TObject *Sender,Extreelib_tlb::HITEM Item,long ColIndex) { OutputDebugString( L"CellStateChanged" ); OutputDebugString( L"Item" ); } Tree1->BeginUpdate(); Tree1->ColumnAutoResize = true; Extreelib_tlb::IColumnPtr var_Column = Tree1->Columns->Add(L""); var_Column->AllowSizing = false; var_Column->Width = 32; var_Column->FormatColumn = L"1 index ``"; Extreelib_tlb::IColumnPtr var_Column1 = Tree1->Columns->Add(L"Def"); var_Column1->AllowSizing = false; var_Column1->Width = 48; var_Column1->FormatColumn = L"` `"; var_Column1->set_Def(Extreelib_tlb::DefColumnEnum::exCellHasCheckBox,TVariant(true)); var_Column1->set_Def(Extreelib_tlb::DefColumnEnum::exCellHasButton,TVariant(true)); var_Column1->set_Def(Extreelib_tlb::DefColumnEnum::exCellButtonAutoWidth,TVariant(true)); Tree1->Columns->Add(L""); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->AddItem(TVariant("")); var_Items->AddItem(TVariant("")); var_Items->AddItem(TVariant("")); var_Items->AddItem(TVariant("")); var_Items->AddItem(TVariant("")); var_Items->AddItem(TVariant("")); var_Items->AddItem(TVariant("")); var_Items->AddItem(TVariant("")); Tree1->EndUpdate(); |
588 |
Does filtering work with umlauts / accents characters
Tree1->BeginUpdate(); Extreelib_tlb::IColumnPtr var_Column = Tree1->Columns->Add(L"Names"); var_Column->DisplayFilterButton = true; var_Column->FilterType = Extreelib_tlb::FilterTypeEnum::exPattern; Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->AddItem(TVariant("Mantel")); var_Items->AddItem(TVariant("Mechanik")); var_Items->AddItem(TVariant("Motor")); var_Items->AddItem(TVariant("Murks")); var_Items->AddItem(TVariant("Märchen")); var_Items->AddItem(TVariant("Möhren")); var_Items->AddItem(TVariant("Mühle")); var_Items->AddItem(TVariant("Sérigraphie")); Tree1->Columns->get_Item(TVariant(0))->Filter = L"*ä*"; Tree1->ApplyFilter(); Tree1->EndUpdate(); |
587 |
The Items.FirstVisibleItem property is read-only. How can I change the first visible item
Tree1->BeginUpdate(); Tree1->MarkSearchColumn = false; Tree1->ColumnAutoResize = false; Tree1->ContinueColumnScroll = false; /* Select the Component\Import Component...\Import a Type Library, to import the following Type Library: Microsoft ActiveX Data Objects 6.1 Library TypeLib: msado15.dll to define the namespace: Adodb_tlb */ //#include "ADODB_TLB.h" Adodb_tlb::_RecordsetPtr rs = Variant::CreateObject(L"ADOR.Recordset"); rs->Open(TVariant("Orders"),TVariant("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExTree\\Sample\\Access\\sample.mdb"),Adodb_tlb::CursorTypeEnum::adOpenStatic,Adodb_tlb::LockTypeEnum::adLockOptimistic,0); Tree1->DataSource = (IDispatch*)rs; Extreelib_tlb::IColumnPtr var_Column = Tree1->Columns->Add(L"Pos"); var_Column->Position = 0; var_Column->FormatColumn = L"0 index ``"; var_Column->Width = 32; var_Column->set_Def(Extreelib_tlb::DefColumnEnum::exCellBackColor,TVariant(15790320)); Tree1->ScrollPos[true] = 13; Tree1->EndUpdate(); |
586 |
How FullPath method works
Tree1->BeginUpdate(); Tree1->LinesAtRoot = Extreelib_tlb::LinesAtRootEnum::exLinesAtRoot; Tree1->Columns->Add(L"C1"); Tree1->Columns->Add(L"C2"); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; long h = var_Items->AddItem(TVariant("Root")); var_Items->set_CellCaption(TVariant(h),TVariant(1),TVariant("A")); var_Items->set_CellCaption(TVariant(var_Items->InsertItem(h,TNoParam(),TVariant("Child 1"))),TVariant(1),TVariant("B")); var_Items->set_CellCaption(TVariant(var_Items->InsertItem(h,TNoParam(),TVariant("Child 2"))),TVariant(1),TVariant("C")); var_Items->set_ExpandItem(h,true); Tree1->SearchColumnIndex = 1; OutputDebugString( PChar(Tree1->SearchColumnIndex) ); OutputDebugString( ->get_FullPath(Tree1->Items->get_ItemByIndex(2)) ); Tree1->SearchColumnIndex = 0; OutputDebugString( PChar(Tree1->SearchColumnIndex) ); OutputDebugString( ->get_FullPath(Tree1->Items->get_ItemByIndex(2)) ); Tree1->EndUpdate(); |
585 |
How can I filter for multiple captions on a single column, using OR clause
Tree1->BeginUpdate(); Tree1->ColumnAutoResize = true; Tree1->ContinueColumnScroll = false; Tree1->MarkSearchColumn = true; Tree1->SearchColumnIndex = 1; Tree1->FilterBarPromptVisible = true; Extreelib_tlb::IColumnsPtr var_Columns = Tree1->Columns; var_Columns->Add(L"Name")->Width = 96; Extreelib_tlb::IColumnPtr var_Column = var_Columns->Add(L"Title"); var_Column->Width = 96; var_Columns->Add(L"City"); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; long h0 = var_Items->AddItem(TVariant("Nancy Davolio")); var_Items->set_CellCaption(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellCaption(TVariant(h0),TVariant(2),TVariant("Seattle")); h0 = var_Items->AddItem(TVariant("Andrew Fuller")); var_Items->set_CellCaption(TVariant(h0),TVariant(1),TVariant("Vice President, Sales")); var_Items->set_CellCaption(TVariant(h0),TVariant(2),TVariant("Tacoma")); var_Items->set_SelectItem(h0,true); h0 = var_Items->AddItem(TVariant("Janet Leverling")); var_Items->set_CellCaption(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellCaption(TVariant(h0),TVariant(2),TVariant("Kirkland")); h0 = var_Items->AddItem(TVariant("Margaret Peacock")); var_Items->set_CellCaption(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellCaption(TVariant(h0),TVariant(2),TVariant("Redmond")); h0 = var_Items->AddItem(TVariant("Steven Buchanan")); var_Items->set_CellCaption(TVariant(h0),TVariant(1),TVariant("Sales Manager")); var_Items->set_CellCaption(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Michael Suyama")); var_Items->set_CellCaption(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellCaption(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Robert King")); var_Items->set_CellCaption(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellCaption(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Laura Callahan")); var_Items->set_CellCaption(TVariant(h0),TVariant(1),TVariant("Inside Sales Coordinator")); var_Items->set_CellCaption(TVariant(h0),TVariant(2),TVariant("Seattle")); h0 = var_Items->AddItem(TVariant("Anne Dodsworth")); var_Items->set_CellCaption(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellCaption(TVariant(h0),TVariant(2),TVariant("London")); Tree1->set_FilterBarPromptColumns(TVariant("1")); Tree1->FilterBarPromptPattern = L"Vice Inside"; Tree1->FilterBarPromptType = Extreelib_tlb::FilterPromptEnum::exFilterPromptContainsAny; Tree1->EndUpdate(); |
584 |
How can I filter for multiple captions on a single column, using AND clause
Tree1->BeginUpdate(); Tree1->ColumnAutoResize = true; Tree1->ContinueColumnScroll = false; Tree1->MarkSearchColumn = true; Tree1->SearchColumnIndex = 1; Tree1->FilterBarPromptVisible = true; Extreelib_tlb::IColumnsPtr var_Columns = Tree1->Columns; var_Columns->Add(L"Name")->Width = 96; Extreelib_tlb::IColumnPtr var_Column = var_Columns->Add(L"Title"); var_Column->Width = 96; var_Columns->Add(L"City"); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; long h0 = var_Items->AddItem(TVariant("Nancy Davolio")); var_Items->set_CellCaption(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellCaption(TVariant(h0),TVariant(2),TVariant("Seattle")); h0 = var_Items->AddItem(TVariant("Andrew Fuller")); var_Items->set_CellCaption(TVariant(h0),TVariant(1),TVariant("Vice President, Sales")); var_Items->set_CellCaption(TVariant(h0),TVariant(2),TVariant("Tacoma")); var_Items->set_SelectItem(h0,true); h0 = var_Items->AddItem(TVariant("Janet Leverling")); var_Items->set_CellCaption(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellCaption(TVariant(h0),TVariant(2),TVariant("Kirkland")); h0 = var_Items->AddItem(TVariant("Margaret Peacock")); var_Items->set_CellCaption(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellCaption(TVariant(h0),TVariant(2),TVariant("Redmond")); h0 = var_Items->AddItem(TVariant("Steven Buchanan")); var_Items->set_CellCaption(TVariant(h0),TVariant(1),TVariant("Sales Manager")); var_Items->set_CellCaption(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Michael Suyama")); var_Items->set_CellCaption(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellCaption(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Robert King")); var_Items->set_CellCaption(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellCaption(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Laura Callahan")); var_Items->set_CellCaption(TVariant(h0),TVariant(1),TVariant("Inside Sales Coordinator")); var_Items->set_CellCaption(TVariant(h0),TVariant(2),TVariant("Seattle")); h0 = var_Items->AddItem(TVariant("Anne Dodsworth")); var_Items->set_CellCaption(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellCaption(TVariant(h0),TVariant(2),TVariant("London")); Tree1->set_FilterBarPromptColumns(TVariant("1")); Tree1->FilterBarPromptPattern = L"Vice Sales"; Tree1->FilterBarPromptType = Extreelib_tlb::FilterPromptEnum::exFilterPromptContainsAll; Tree1->EndUpdate(); |
583 |
Can I set the search box / filterbarprompt to invisible, so I can use my own input and *string* via VBA
Tree1->BeginUpdate(); Tree1->ColumnAutoResize = true; Tree1->ContinueColumnScroll = false; Tree1->MarkSearchColumn = false; Tree1->SearchColumnIndex = 1; Tree1->FilterBarHeight = 0; Tree1->FilterBarPromptVisible = true; Extreelib_tlb::IColumnsPtr var_Columns = Tree1->Columns; var_Columns->Add(L"Name")->Width = 96; var_Columns->Add(L"Title")->Width = 96; var_Columns->Add(L"City"); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; long h0 = var_Items->AddItem(TVariant("Nancy Davolio")); var_Items->set_CellCaption(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellCaption(TVariant(h0),TVariant(2),TVariant("Seattle")); h0 = var_Items->AddItem(TVariant("Andrew Fuller")); var_Items->set_CellCaption(TVariant(h0),TVariant(1),TVariant("Vice President, Sales")); var_Items->set_CellCaption(TVariant(h0),TVariant(2),TVariant("Tacoma")); var_Items->set_SelectItem(h0,true); h0 = var_Items->AddItem(TVariant("Janet Leverling")); var_Items->set_CellCaption(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellCaption(TVariant(h0),TVariant(2),TVariant("Kirkland")); h0 = var_Items->AddItem(TVariant("Margaret Peacock")); var_Items->set_CellCaption(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellCaption(TVariant(h0),TVariant(2),TVariant("Redmond")); h0 = var_Items->AddItem(TVariant("Steven Buchanan")); var_Items->set_CellCaption(TVariant(h0),TVariant(1),TVariant("Sales Manager")); var_Items->set_CellCaption(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Michael Suyama")); var_Items->set_CellCaption(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellCaption(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Robert King")); var_Items->set_CellCaption(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellCaption(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Laura Callahan")); var_Items->set_CellCaption(TVariant(h0),TVariant(1),TVariant("Inside Sales Coordinator")); var_Items->set_CellCaption(TVariant(h0),TVariant(2),TVariant("Seattle")); h0 = var_Items->AddItem(TVariant("Anne Dodsworth")); var_Items->set_CellCaption(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellCaption(TVariant(h0),TVariant(2),TVariant("London")); Tree1->FilterBarPromptPattern = L"London"; Tree1->EndUpdate(); |
582 |
How to load a hierarchy using the control's DataSource property (Parent-ID-Relation)
// AddItem event - Occurs after a new Item has been inserted to Items collection. void __fastcall TForm1::Tree1AddItem(TObject *Sender,Extreelib_tlb::HITEM Item) { Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->SetParent(Item,var_Items->get_FindItem(TVariant(var_Items->get_CellCaption(TVariant(Item),TVariant("ReportsTo"))),TVariant("EmployeeID"),TNoParam())); } Tree1->BeginUpdate(); Tree1->LinesAtRoot = Extreelib_tlb::LinesAtRootEnum::exLinesAtRoot; Tree1->ColumnAutoResize = false; Tree1->ContinueColumnScroll = false; /* Select the Component\Import Component...\Import a Type Library, to import the following Type Library: Microsoft ActiveX Data Objects 6.1 Library TypeLib: msado15.dll to define the namespace: Adodb_tlb */ //#include "ADODB_TLB.h" Adodb_tlb::_RecordsetPtr rs = Variant::CreateObject(L"ADOR.Recordset"); rs->Open(TVariant("SELECT * FROM Employees ORDER BY ReportsTo"),TVariant("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExTree\\Sample\\Access\\sample.mdb"),Adodb_tlb::CursorTypeEnum::adOpenStatic,Adodb_tlb::LockTypeEnum::adLockOptimistic,0); Tree1->DataSource = (IDispatch*)rs; Tree1->Items->set_ExpandItem(0,true); Tree1->EndUpdate(); |
581 |
Is there any option to control where I can drop the items when using the AutoDrag property
// AllowAutoDrag event - Occurs when the user drags the item between InsertA and InsertB as child of NewParent. void __fastcall TForm1::Tree1AllowAutoDrag(TObject *Sender,Extreelib_tlb::HITEM Item,Extreelib_tlb::HITEM NewParent,Extreelib_tlb::HITEM InsertA,Extreelib_tlb::HITEM InsertB,VARIANT_BOOL * Cancel) { Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; OutputDebugString( L"NewParent" ); OutputDebugString( PChar(var_Items->get_CellCaption(TVariant(NewParent),TVariant(0))) ); OutputDebugString( L"After" ); OutputDebugString( PChar(var_Items->get_CellCaption(TVariant(InsertA),TVariant(0))) ); OutputDebugString( L"Before" ); OutputDebugString( PChar(var_Items->get_CellCaption(TVariant(InsertB),TVariant(0))) ); Cancel = true; } Tree1->BeginUpdate(); Tree1->AutoDrag = Extreelib_tlb::AutoDragEnum::exAutoDragPositionAny; Tree1->LinesAtRoot = Extreelib_tlb::LinesAtRootEnum::exNoLinesAtRoot; Tree1->HasLines = Extreelib_tlb::HierarchyLineEnum::exThinLine; Tree1->ShowFocusRect = false; Tree1->Columns->Add(L"Task"); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; long h = var_Items->AddItem(TVariant("Group 1")); var_Items->set_ItemDivider(h,0); var_Items->set_ItemBold(h,true); long h1 = var_Items->InsertItem(h,TNoParam(),TVariant("Task 1")); long h2 = var_Items->InsertItem(h,TNoParam(),TVariant("Task 2")); long h3 = var_Items->InsertItem(h,TNoParam(),TVariant("Task 3")); var_Items->set_ExpandItem(h,true); h = var_Items->AddItem(TVariant("Group 2")); var_Items->set_ItemBold(h,true); var_Items->set_ItemDivider(h,0); Tree1->EndUpdate(); |
580 |
The FindPath is not case sensitive. How can I make it work case sensitive
Tree1->BeginUpdate(); Tree1->LinesAtRoot = Extreelib_tlb::LinesAtRootEnum::exLinesAtRoot; Tree1->Columns->Add(L"Default"); Tree1->ASCIIUpper = L""; Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; long h = var_Items->AddItem(TVariant("L:")); var_Items->InsertItem(h,TNoParam(),TVariant("test")); var_Items->InsertItem(h,TNoParam(),TVariant("Test")); var_Items->InsertItem(h,TNoParam(),TVariant("TEST")); var_Items->set_ExpandItem(h,true); var_Items->set_ItemBold(var_Items->get_FindPath(L"L:\\TEST"),true); Tree1->EndUpdate(); |
579 |
How do I enable / display a tooltip while user selects new items from the drop down filter panel
Tree1->BeginUpdate(); Tree1->LinesAtRoot = Extreelib_tlb::LinesAtRootEnum::exLinesAtRoot; Extreelib_tlb::IColumnPtr var_Column = Tree1->Columns->Add(L"Items"); var_Column->DisplayFilterButton = true; var_Column->DisplayFilterPattern = false; var_Column->FilterList = Extreelib_tlb::FilterListEnum::exShowExclude | Extreelib_tlb::FilterListEnum::exEnableToolTip | Extreelib_tlb::FilterListEnum::exShowFocusItem | Extreelib_tlb::FilterListEnum::exShowCheckBox; Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->AddItem(TVariant("Item 1")); var_Items->AddItem(TVariant("Item 2")); var_Items->AddItem(TVariant("Item 3")); var_Items->AddItem(TVariant("Item 4")); Extreelib_tlb::IColumnPtr var_Column1 = Tree1->Columns->get_Item(TVariant(0)); var_Column1->FilterType = Extreelib_tlb::FilterTypeEnum::exFilterExclude | Extreelib_tlb::FilterTypeEnum::exFilter; var_Column1->Filter = L"Item 1|Item 4"; Tree1->ApplyFilter(); Tree1->EndUpdate(); |
578 |
How can I align captions of items with checkbox, with items with no checkbox
Tree1->BeginUpdate(); Tree1->Columns->Add(L"Default"); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->set_CellImages(TVariant(var_Items->AddItem(TVariant(0))),TVariant(0),TVariant("1")); var_Items->set_CellHasCheckBox(TVariant(var_Items->AddItem(TVariant(1))),TVariant(0),true); var_Items->set_CellImages(TVariant(var_Items->AddItem(TVariant(2))),TVariant(0),TVariant("1")); Tree1->EndUpdate(); |
577 |
The control does not ensure the item to fit the control's client area once the user clicks the cell's button or check box. What can be done
// MouseDown event - Occurs when the user presses a mouse button. void __fastcall TForm1::Tree1MouseDown(TObject *Sender,short Button,short Shift,int X,int Y) { // Items.EnsureVisibleItem(ItemFromPoint(-1,-1,c,hit)) } Tree1->BeginUpdate(); Tree1->TreeColumnIndex = -1; Tree1->SelForeColor = Tree1->ForeColor; Extreelib_tlb::IColumnPtr var_Column = Tree1->Columns->Add(L"Buttons"); var_Column->Alignment = Extreelib_tlb::AlignmentEnum::CenterAlignment; var_Column->set_Def(Extreelib_tlb::DefColumnEnum::exCellHasButton,TVariant(true)); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->AddItem(TVariant("Button A")); var_Items->AddItem(TVariant("Button B")); var_Items->AddItem(TVariant("Button C")); Tree1->EndUpdate(); |
576 |
Does the title of the cell's tooltip supports HTML format
Tree1->BeginUpdate(); Extreelib_tlb::IColumnPtr var_Column = Tree1->Columns->Add(L""); var_Column->Caption = L""; var_Column->HTMLCaption = L"Column"; Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->set_CellToolTip(TVariant(var_Items->AddItem(TVariant("tooltip w/h different title"))),TVariant(0),TVariant(String("<c><b><fgcolor=FF0000>Title</fgcolor></b><br>This is bit of text that's shown when the user hovers the cell. This shows the tit") + "le centered with a different color.")); Tree1->EndUpdate(); |
575 |
How do I specify a different title for the cell's tooltip
Tree1->BeginUpdate(); Extreelib_tlb::IColumnPtr var_Column = Tree1->Columns->Add(L""); var_Column->Caption = L"This is the title"; var_Column->HTMLCaption = L"Column"; Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->set_CellToolTip(TVariant(var_Items->AddItem(TVariant("tooltip w/h different title"))),TVariant(0),L"This is bit of text that's shown when the user hovers the cell."); Tree1->EndUpdate(); |
574 |
The cell's tooltip displays the column's caption in its title. How can I get ride of that
Tree1->BeginUpdate(); Extreelib_tlb::IColumnsPtr var_Columns = Tree1->Columns; var_Columns->Add(L"C1"); var_Columns->Add(L"C2"); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; long h = var_Items->AddItem(TVariant("tooltip w/h caption")); var_Items->set_CellToolTip(TVariant(h),TVariant(0),L"This is bit of text that's shown when the user hovers the cell. This shows the column's caption in the title."); var_Items->set_CellCaption(TVariant(h),TVariant(1),TVariant("tooltip no caption")); var_Items->set_CellToolTip(TVariant(h),TVariant(1),L"This is bit of text that's shown when the user hovers the cell. This shows no column's caption in the title."); Extreelib_tlb::IColumnPtr var_Column = Tree1->Columns->get_Item(TVariant("C2")); var_Column->HTMLCaption = var_Column->Caption; var_Column->Caption = L""; Tree1->EndUpdate(); |
573 |
How can I programmatically show the column's filter
// RClick event - Fired when right mouse button is clicked void __fastcall TForm1::Tree1RClick(TObject *Sender) { long i = Tree1->ItemFromPoint[-1,-1,c,hit]; Tree1->Columns->get_Item(TVariant(c))->ShowFilter(TVariant("-1,-1,128,128")); } Tree1->BeginUpdate(); Tree1->ShowFocusRect = false; Extreelib_tlb::IColumnPtr var_Column = Tree1->Columns->Add(L"Items "); var_Column->DisplayFilterPattern = false; var_Column->FilterList = Extreelib_tlb::FilterListEnum::exShowExclude | Extreelib_tlb::FilterListEnum::exShowFocusItem | Extreelib_tlb::FilterListEnum::exShowCheckBox; Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->AddItem(TVariant("Item 1")); var_Items->AddItem(TVariant("Item 2")); var_Items->AddItem(TVariant("Item 3")); Tree1->EndUpdate(); |
572 |
I want to be able to click on one of the headers, and sort by other column. How can I do that (method 2)
// ColumnClick event - Fired after the user clicks on column's header. void __fastcall TForm1::Tree1ColumnClick(TObject *Sender,Extreelib_tlb::IColumn *Column) { // Column.SortOrder = 1 Tree1->SortOnClick = Extreelib_tlb::SortOnClickEnum::exDefaultSort; Tree1->Columns->get_Item(TVariant("Sort"))->SortOrder = Extreelib_tlb::SortOrderEnum::SortAscending; Tree1->SortOnClick = Extreelib_tlb::SortOnClickEnum::exUserSort; } Tree1->BeginUpdate(); Tree1->MarkSearchColumn = false; Tree1->SortOnClick = Extreelib_tlb::SortOnClickEnum::exUserSort; Tree1->Columns->Add(L"Items"); Tree1->Columns->Add(L"Sort")->Visible = false; Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->set_CellCaption(TVariant(var_Items->AddItem(TVariant("Item 1 (3)"))),TVariant(1),TVariant(3)); var_Items->set_CellCaption(TVariant(var_Items->AddItem(TVariant("Item 2 (1)"))),TVariant(1),TVariant(1)); var_Items->set_CellCaption(TVariant(var_Items->AddItem(TVariant("Item 3 (2)"))),TVariant(1),TVariant(2)); Tree1->EndUpdate(); |
571 |
I want to be able to click on one of the headers, and sort by other column. How can I do that (method 1)
// ColumnClick event - Fired after the user clicks on column's header. void __fastcall TForm1::Tree1ColumnClick(TObject *Sender,Extreelib_tlb::IColumn *Column) { // Column.SortOrder = 1 Tree1->Items->SortChildren(0,TVariant("Sort"),true); } Tree1->BeginUpdate(); Tree1->MarkSearchColumn = false; Tree1->SortOnClick = Extreelib_tlb::SortOnClickEnum::exUserSort; Tree1->Columns->Add(L"Items"); Tree1->Columns->Add(L"Sort")->Visible = false; Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->set_CellCaption(TVariant(var_Items->AddItem(TVariant("Item 1 (3)"))),TVariant(1),TVariant(3)); var_Items->set_CellCaption(TVariant(var_Items->AddItem(TVariant("Item 2 (1)"))),TVariant(1),TVariant(1)); var_Items->set_CellCaption(TVariant(var_Items->AddItem(TVariant("Item 3 (2)"))),TVariant(1),TVariant(2)); Tree1->EndUpdate(); |
570 |
I have a 3 level hierarchy in the treeview, and I want to create a filter that only shows the items in the 2nd level of the hierarchy, is this possible
Tree1->LinesAtRoot = Extreelib_tlb::LinesAtRootEnum::exLinesAtRoot; Tree1->MarkSearchColumn = false; Tree1->Columns->Add(L"Items"); Tree1->Columns->Add(L"Level")->Visible = false; Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; long h = var_Items->AddItem(TVariant("Parent")); var_Items->set_CellCaption(TVariant(h),TVariant(1),TVariant(0)); long hChild = var_Items->InsertItem(h,TNoParam(),TVariant("Child 1.1")); var_Items->set_CellCaption(TVariant(hChild),TVariant(1),TVariant(1)); long hSubChild = var_Items->InsertItem(hChild,TNoParam(),TVariant("SubChild A")); var_Items->set_CellCaption(TVariant(hSubChild),TVariant(1),TVariant(2)); hChild = var_Items->InsertItem(h,TNoParam(),TVariant("Child 1.2")); var_Items->set_CellCaption(TVariant(hChild),TVariant(1),TVariant(1)); hSubChild = var_Items->InsertItem(hChild,TNoParam(),TVariant("SubChild B")); var_Items->set_CellCaption(TVariant(hSubChild),TVariant(1),TVariant(2)); var_Items->set_ExpandItem(h,true); Tree1->FilterInclude = Extreelib_tlb::FilterIncludeEnum::exMatchingItemsOnly; Extreelib_tlb::IColumnPtr var_Column = Tree1->Columns->get_Item(TVariant("Level")); var_Column->FilterType = Extreelib_tlb::FilterTypeEnum::exFilter; var_Column->Filter = L"2"; Tree1->ApplyFilter(); |
569 |
How can I sort by two-columns, one by date and one by time
Tree1->BeginUpdate(); Tree1->SingleSort = false; Extreelib_tlb::IColumnsPtr var_Columns = Tree1->Columns; var_Columns->Add(L"Index")->FormatColumn = L"1 index ``"; var_Columns->Add(L"Date")->SortType = Extreelib_tlb::SortTypeEnum::SortDate; Extreelib_tlb::IColumnPtr var_Column = var_Columns->Add(L"Time"); var_Column->SortType = Extreelib_tlb::SortTypeEnum::SortTime; var_Column->FormatColumn = L"time(value)"; Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; long h = var_Items->AddItem(TVariant(0)); var_Items->set_CellCaption(TVariant(h),TVariant(1),TVariant(TDateTime(2001,1,1).operator double())); var_Items->set_CellCaption(TVariant(h),TVariant(2),TVariant(TDateTime(2001,1,1,10,00,00,0).operator double())); h = var_Items->AddItem(TVariant(0)); var_Items->set_CellCaption(TVariant(h),TVariant(1),TVariant(TDateTime(2000,12,31).operator double())); var_Items->set_CellCaption(TVariant(h),TVariant(2),TVariant(TDateTime(2001,1,1,10,00,00,0).operator double())); h = var_Items->AddItem(TVariant(0)); var_Items->set_CellCaption(TVariant(h),TVariant(1),TVariant(TDateTime(2001,1,1).operator double())); var_Items->set_CellCaption(TVariant(h),TVariant(2),TVariant(TDateTime(2001,1,1,6,00,00,0).operator double())); h = var_Items->AddItem(TVariant(0)); var_Items->set_CellCaption(TVariant(h),TVariant(1),TVariant(TDateTime(2000,12,31).operator double())); var_Items->set_CellCaption(TVariant(h),TVariant(2),TVariant(TDateTime(2001,1,1,8,00,00,0).operator double())); h = var_Items->AddItem(TVariant(0)); var_Items->set_CellCaption(TVariant(h),TVariant(1),TVariant(TDateTime(2001,1,1).operator double())); var_Items->set_CellCaption(TVariant(h),TVariant(2),TVariant(TDateTime(2001,1,1,8,00,00,0).operator double())); h = var_Items->AddItem(TVariant(0)); var_Items->set_CellCaption(TVariant(h),TVariant(1),TVariant(TDateTime(2000,12,31).operator double())); var_Items->set_CellCaption(TVariant(h),TVariant(2),TVariant(TDateTime(2001,1,1,6,00,00,0).operator double())); Tree1->Layout = L"multiplesort=\"C1:1 C2:1\""; Tree1->EndUpdate(); |
568 |
We are using custom buttons for the +/- on the treeview control, is there a way to control the size of the image
Tree1->BeginUpdate(); Extreelib_tlb::IAppearancePtr var_Appearance = Tree1->VisualAppearance; var_Appearance->Add(3,TVariant(String("gBFLBCJwBAEHhEJAAChABDEMACAADACAxRDQNABQKAAzQFAYbBkGqGAAGIYxYgmFgAQhFcZQSKUOQTDKMIziaQIRg8JYlDTJcIjKKEVQHFiXIrAKKwEgmEQMQiCcbzX") + "IUBxAAqVZZFUaKAi+Qg4TLBAzUSAAYhtHqeJBjID4JA6UJXRpIAIQSSBUjGOg6TiMUYZAguAxCEzZUT0fAYUQSCC3ZzDCKoRpiCT7Xg8V5OVbjUz9P7AMBwLA7erxap6" + "PJeD54QymGp/R5eMhyLI8UxXFqRY6veKtJhGDIrT5CEIQVA9EyXJqnahqOiaCguPorQy/dYYdg2BYBPS6MAvG4bVrOd59XrgN42fY2ByzAqlMQwS7rOqiY6YWTnehWTo" + "HE+JZUmoLB5CufQuAkBYkGO+ZrDWAo7keZZyHmH5+i8X4bluaJyHgGB9mQHx3JjBpViqJRHmueZ7H8Xo3i2fYAl+d5tncMRfDcdZeDMDIjCCJwokoEoQiEJ4KCIfIdgU" + "SZIAWaoGCEUh2BIJ4gnKBgMDICAnHoCggg0Aw4k0KAJkIagaguYwIj4LAmiKEw2CUIIiHMUJSDQSYyGCFYMGQCJCD0JRjiMRg3gmTYjGSVgmgkchSD4JJklIRIXCSSQY" + "j4U4UgkQhGE+EwJEkJJWhGpgGGIOBNmMdhPg8SRiHCGAlibNhohqJpJi4T4ZA2WYIgEYInGOGJlDkCQyECDoTEkKQ+E+C5oCIVhQCUCQpnSDoeg4SZZH8YdhjibQ7AiU" + "gkgcJFyiyEYmGmOhqhyJ5pmILoYCKaRSB6Eg7CcZgZggaRqHqNoTiuDpKkKMormsQ4xiUYgYiKEo6CCWgWiqPovloZoGjoKQYiQBCAg==")); var_Appearance->Add(4,TVariant(String("gBFLBCJwBAEHhEJAAChABDcMACAADACAxRDQNABQKAAzQFAYbBkGqGAAGIYxYgmFgAQhFcZQSKUOQTDKMIziaQIRg8JYlDTJcIjKKEVQHFiXIrAKKwEgmEQMQiCcbzX") + "IUBxAAqVZZFUaKAi+Qg4TLBAzUSAAYhtHqeJBjID4JA6UJXRpIAIQSSBUjGOg6TiMUYZAguAxCEzZUT0fAYUQSCC3ZzDCKoRpiCT7Xg8V5OVbjUz9P7AMBwLA7erxap6" + "PJeD54QymGp/R5eMhyLI8UxXFqRY6veKtJhGDIrT5CEIQVA9EyXJqnahqOiaCguPorQy/dYYdg2BYBPS6MAvG4bVrOd59XrgN42fY2ByzAqlMQwS7rOqiY6YWTnehWTo" + "HE+JZUmoLB5CufQuAkBYkGO+ZrDWAo7keZZyHmPQ+g8X4fluYBhneEB9l0Iwpg6RRWiqFQfg+V5nnefh/GAB5yAIfRMFeRZdHeDJDCiSApkoMoEiQKBJmKCIfCcYQiHI" + "FYFkmeBaBOA5JmgMIhgITICAmXoBkgIxAk4MxKAIcIaD+YpIjYLoLmMCI2CkJoiGMNgiCCIhDFCUg0EmMhghWDBkAkBg9CUY4jEYN4JA2IxklYJoJHIUg+CSZJSESFwk" + "mUKRSFOFRlCIUIRhOZJCFISQ1iQdgEgGGJOBMeJdhOY5SFiHAmAkaYmG6GwmhmLhthsJJ5hSXYYkgFgKHgOYOFOEITCQCJpDSEoTmgQhUhOIRoHoGoCh+SJpnCZIeBed" + "gaHgO4OlOMINCISByECDQikkGhuh2JwpmqBogCKaYiC6FwhmkQ4yHgYYYgaFopiuaRakCbIsisSpGjYOwaFYIYKCkK5CA2IRqiwCwFiYaBrkKEYKEAQCAgA==")); var_Appearance->Add(1,TVariant("CP:3 -4 -4 4 4")); var_Appearance->Add(2,TVariant("CP:4 -4 -4 4 4")); Tree1->DefaultItemHeight = 22; Tree1->LinesAtRoot = Extreelib_tlb::LinesAtRootEnum::exGroupLinesAtRoot; Tree1->HasButtons = Extreelib_tlb::ExpandButtonEnum::exCustom; Tree1->HasButtonsCustom[false] = 16777216; Tree1->HasButtonsCustom[true] = 33554432; Tree1->Columns->Add(L"Column"); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; long h = var_Items->AddItem(TVariant("Root 1")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 1")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 2")); var_Items->set_ExpandItem(h,true); h = var_Items->AddItem(TVariant("Root 2")); var_Items->InsertItem(h,TNoParam(),TVariant("Child")); Tree1->EndUpdate(); |
567 |
How can I connect to a DBF file
Tree1->BeginUpdate(); Tree1->ColumnAutoResize = false; Tree1->ContinueColumnScroll = false; Tree1->MarkSearchColumn = false; /* Select the Component\Import Component...\Import a Type Library, to import the following Type Library: Microsoft ActiveX Data Objects 6.1 Library TypeLib: msado15.dll to define the namespace: Adodb_tlb */ //#include "ADODB_TLB.h" Adodb_tlb::_RecordsetPtr rs = Variant::CreateObject(L"ADODB.Recordset"); rs->Open(TVariant("Select * From foxcode.DBF"),TVariant("Provider=vfpoledb;Data Source=C:\\Program Files\\Microsoft Visual FoxPro 9\\"),Adodb_tlb::CursorTypeEnum::adOpenStatic,Adodb_tlb::LockTypeEnum::adLockOptimistic,0); Tree1->DataSource = (IDispatch*)rs; Tree1->EndUpdate(); |
566 |
Do you have any Fit-To-Page options when printing the control
Tree1->BeginUpdate(); Tree1->ColumnAutoResize = false; /* Select the Component\Import Component...\Import a Type Library, to import the following Type Library: Microsoft ActiveX Data Objects 6.1 Library TypeLib: msado15.dll to define the namespace: Adodb_tlb */ //#include "ADODB_TLB.h" Adodb_tlb::_RecordsetPtr rs = Variant::CreateObject(L"ADOR.Recordset"); rs->Open(TVariant("Orders"),TVariant("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExTree\\Sample\\Access\\sample.mdb"),Adodb_tlb::CursorTypeEnum::adOpenStatic,Adodb_tlb::LockTypeEnum::adLockOptimistic,0); Tree1->DataSource = (IDispatch*)rs; Tree1->EndUpdate(); /* Select the Component\Import Component...\Import a Type Library, to import the following Type Library: ExPrint 1.0 Control Library TypeLib: ExPrint.dll to define the namespace: Exprintlib_tlb */ //#include "EXPRINTLIB_TLB.h" Exprintlib_tlb::IExPrintPtr var_Print = Variant::CreateObject(L"Exontrol.Print"); var_Print->set_Options(TVariant("FitToPage = On")); var_Print->PrintExt = (IUnknown*)Tree1->DefaultDispatch; var_Print->Preview(); |
565 |
Does your control supports scrolling by touching the screen
Tree1->BeginUpdate(); Tree1->ColumnAutoResize = false; /* Select the Component\Import Component...\Import a Type Library, to import the following Type Library: Microsoft ActiveX Data Objects 6.1 Library TypeLib: msado15.dll to define the namespace: Adodb_tlb */ //#include "ADODB_TLB.h" Adodb_tlb::_RecordsetPtr rs = Variant::CreateObject(L"ADOR.Recordset"); rs->Open(TVariant("Orders"),TVariant("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExTree\\Sample\\Access\\sample.mdb"),Adodb_tlb::CursorTypeEnum::adOpenStatic,Adodb_tlb::LockTypeEnum::adLockOptimistic,0); Tree1->DataSource = (IDispatch*)rs; Tree1->AutoDrag = Extreelib_tlb::AutoDragEnum::exAutoDragScrollOnShortTouch | Extreelib_tlb::AutoDragEnum::exAutoDragScroll; Tree1->ScrollBySingleLine = true; Tree1->ContinueColumnScroll = true; Tree1->EndUpdate(); |
564 |
How do I prevent showing the control's BackColorAlternate property on empty / non-items part of the control
Tree1->BackColorAlternate = 0x7ff0f0f0; Tree1->Columns->Add(L"Column"); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->AddItem(TVariant("Item 1")); var_Items->AddItem(TVariant("Item 2")); var_Items->AddItem(TVariant("Item 3")); var_Items->AddItem(TVariant("Item 4")); var_Items->AddItem(TVariant("Item 5")); |
563 |
Is there a syntax for conditional formatting of items, based on CellState/CellStateChange
// CellStateChanged event - Fired after cell's state has been changed. void __fastcall TForm1::Tree1CellStateChanged(TObject *Sender,Extreelib_tlb::HITEM Item,long ColIndex) { Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->set_CellCaption(TVariant(Item),TVariant(2),TVariant(var_Items->get_CellState(TVariant(Item),TVariant(0)))); } Tree1->BeginUpdate(); Tree1->ShowFocusRect = false; Tree1->MarkSearchColumn = false; Tree1->SelBackMode = Extreelib_tlb::BackModeEnum::exTransparent; Extreelib_tlb::IConditionalFormatPtr var_ConditionalFormat = Tree1->ConditionalFormats->Add(L"%2 != 0",TNoParam()); var_ConditionalFormat->Bold = true; var_ConditionalFormat->ForeColor = RGB(255,0,0); var_ConditionalFormat->ApplyTo = Extreelib_tlb::FormatApplyToEnum::exFormatToItems; Extreelib_tlb::IColumnPtr var_Column = Tree1->Columns->Add(L""); var_Column->set_Def(Extreelib_tlb::DefColumnEnum::exCellHasCheckBox,TVariant(true)); var_Column->Width = 16; var_Column->AllowSizing = false; Tree1->Columns->Add(L"Information"); Tree1->Columns->Add(L"Hidden")->Visible = false; Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->set_CellCaption(TVariant(var_Items->AddItem(TVariant(""))),TVariant(1),TVariant("This is a bit of text associated")); long h = var_Items->AddItem(TVariant("")); var_Items->set_CellCaption(TVariant(h),TVariant(1),TVariant("This is a bit of text associated")); var_Items->set_CellState(TVariant(h),TVariant(0),1); var_Items->set_CellCaption(TVariant(var_Items->AddItem(TVariant(""))),TVariant(1),TVariant("This is a bit of text associated")); Tree1->EndUpdate(); |
562 |
How can I start editing the cell as soon as the user clicks a cell
// AfterCellEdit event - Occurs after data in the current cell is edited. void __fastcall TForm1::Tree1AfterCellEdit(TObject *Sender,Extreelib_tlb::HITEM Item,long ColIndex,BSTR NewCaption) { Tree1->Items->set_CellCaption(TVariant(Item),TVariant(ColIndex),TVariant(NewCaption)); } // CancelCellEdit event - Occurs if the edit operation is canceled. void __fastcall TForm1::Tree1CancelCellEdit(TObject *Sender,Extreelib_tlb::HITEM Item,long ColIndex,Variant Reserved) { Tree1->Items->set_CellCaption(TVariant(Item),TVariant(ColIndex),TVariant(Reserved)); } // Click event - Occurs when the user presses and then releases the left mouse button over the tree control. void __fastcall TForm1::Tree1Click(TObject *Sender) { Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->Edit(TVariant(var_Items->FocusItem),TVariant(0)); } Tree1->AllowEdit = true; Tree1->Columns->Add(L"Column"); Tree1->Items->AddItem(TVariant("Item 1")); Tree1->Items->AddItem(TVariant("Item 2")); Tree1->Items->AddItem(TVariant("")); |
561 |
How do I programmatically exclude items from the filter
Tree1->BeginUpdate(); Tree1->LinesAtRoot = Extreelib_tlb::LinesAtRootEnum::exLinesAtRoot; Extreelib_tlb::IColumnPtr var_Column = Tree1->Columns->Add(L"Items"); var_Column->DisplayFilterButton = true; var_Column->DisplayFilterPattern = false; var_Column->FilterList = Extreelib_tlb::FilterListEnum::exShowExclude | Extreelib_tlb::FilterListEnum::exShowFocusItem | Extreelib_tlb::FilterListEnum::exShowCheckBox; Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->AddItem(TVariant("Item 1")); var_Items->AddItem(TVariant("Item 2")); var_Items->AddItem(TVariant("Item 3")); var_Items->AddItem(TVariant("Item 4")); Extreelib_tlb::IColumnPtr var_Column1 = Tree1->Columns->get_Item(TVariant(0)); var_Column1->FilterType = Extreelib_tlb::FilterTypeEnum::exFilterExclude | Extreelib_tlb::FilterTypeEnum::exFilter; var_Column1->Filter = L"Item 1|Item 4"; Tree1->ApplyFilter(); Tree1->EndUpdate(); |
560 |
How can I sort the columns to be displayed on the columns floating bar
|
559 |
How can I add a vertical padding
Tree1->BeginUpdate(); Tree1->DrawGridLines = Extreelib_tlb::GridLinesEnum::exAllLines; Extreelib_tlb::IColumnPtr var_Column = Tree1->Columns->Add(L"Padding"); var_Column->set_Def(Extreelib_tlb::DefColumnEnum::exCellHasCheckBox,TVariant(true)); var_Column->set_Def(Extreelib_tlb::DefColumnEnum::exCellSingleLine,TVariant(false)); var_Column->set_Def(Extreelib_tlb::DefColumnEnum::exCellPaddingLeft,TVariant(6)); var_Column->set_Def(Extreelib_tlb::DefColumnEnum::exCellPaddingRight,TVariant(6)); var_Column->set_Def(Extreelib_tlb::DefColumnEnum::exCellPaddingTop,TVariant(6)); var_Column->set_Def(Extreelib_tlb::DefColumnEnum::exCellPaddingBottom,TVariant(6)); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->AddItem(TVariant("padding")); var_Items->AddItem(TVariant("padding")); Tree1->EndUpdate(); |
558 |
Is the PutItems method running .AddItem event
// AddItem event - Occurs after a new Item has been inserted to Items collection. void __fastcall TForm1::Tree1AddItem(TObject *Sender,Extreelib_tlb::HITEM Item) { OutputDebugString( L"Adding ..." ); OutputDebugString( PChar(Tree1->Items->get_CellCaption(TVariant(Item),TVariant(0))) ); } Tree1->LinesAtRoot = Extreelib_tlb::LinesAtRootEnum::exLinesAtRoot; Tree1->Columns->Add(L"Def"); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; long h = var_Items->AddItem(TVariant("Root")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 1")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 2")); OutputDebugString( L"Call PutItems" ); Tree1->PutItems(Tree1->GetItems(TVariant(-1)),TNoParam()); |
557 |
How do you embed HTML options into the anchor click string
// AnchorClick event - Occurs when an anchor element is clicked. void __fastcall TForm1::Tree1AnchorClick(TObject *Sender,BSTR AnchorID,BSTR Options) { OutputDebugString( L"AnchorID" ); OutputDebugString( L"Options" ); } Tree1->BeginUpdate(); Extreelib_tlb::IColumnsPtr var_Columns = Tree1->Columns; var_Columns->Add(L"Car")->set_Def(Extreelib_tlb::DefColumnEnum::exCellCaptionFormat,TVariant(1)); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->AddItem(TVariant("<a mazda_1;options for 1>Mazda <b>1</b></a>")); var_Items->AddItem(TVariant("<a mazda_2;options for 2>Mazda <b>2</b></a>")); var_Items->AddItem(TVariant("<a mazda_3;options for 3a>Mazda <b>3.a</b></a>")); var_Items->AddItem(TVariant("<a mazda_3;options for 3b>Mazda <b>3.b</b></a>")); Tree1->EndUpdate(); |
556 |
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 3)
Tree1->BeginUpdate(); Tree1->VisualAppearance->Add(1,TVariant(String("gBFLBCJwBAEHhEJAEGg4BVEIQAAYAQGKIYBkAKBQAGaAoDDMOQwQwAAxjGKEEwsACEIrjKCRShyCYZRhGcTSBCIZBqEqSZLiEZRQCWIAzATGYBRfIUEgjBM6ExwG78e") + "gBHp/ZpkACIJJAaRjHQdJxGKKMQB9DIhCZpeKhWgkKIJBzOEyBRC4ERBGqNGrsIgLEqWZpnWhaNpWXYTLyBN64LhuK46g53O6wLxvK6hEr2dJ/YBcIAOfghf4NQ7EMRx" + "LC8Mw3BDvYDkOAABAIgI=")); Tree1->SelBackColor = 0x1fffffe; Tree1->ShowFocusRect = false; Tree1->Columns->Add(L"Items"); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->set_ItemBackColor(var_Items->AddItem(TVariant("red")),RGB(255,0,0)); var_Items->set_ItemBackColor(var_Items->AddItem(TVariant("blue")),RGB(0,0,255)); var_Items->set_ItemBackColor(var_Items->AddItem(TVariant("green")),RGB(0,255,0)); Tree1->EndUpdate(); |
555 |
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 2)
Tree1->BeginUpdate(); Tree1->SelBackMode = Extreelib_tlb::BackModeEnum::exTransparent; Tree1->ShowFocusRect = false; Tree1->Columns->Add(L"Items"); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->set_ItemBackColor(var_Items->AddItem(TVariant("red")),RGB(255,0,0)); var_Items->set_ItemBackColor(var_Items->AddItem(TVariant("blue")),RGB(0,0,255)); var_Items->set_ItemBackColor(var_Items->AddItem(TVariant("green")),RGB(0,255,0)); Tree1->EndUpdate(); |
554 |
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 1)
Tree1->BeginUpdate(); Tree1->SelBackColor = Tree1->BackColor; Tree1->SelForeColor = Tree1->ForeColor; Tree1->ShowFocusRect = true; Tree1->Columns->Add(L"Items"); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->set_ItemBackColor(var_Items->AddItem(TVariant("red")),RGB(255,0,0)); var_Items->set_ItemBackColor(var_Items->AddItem(TVariant("blue")),RGB(0,0,255)); var_Items->set_ItemBackColor(var_Items->AddItem(TVariant("green")),RGB(0,255,0)); Tree1->EndUpdate(); |
553 |
How do I arrange my columns on multiple levels
Tree1->BeginUpdate(); Tree1->ColumnAutoResize = false; Tree1->DrawGridLines = Extreelib_tlb::GridLinesEnum::exAllLines; Extreelib_tlb::IColumnsPtr var_Columns = Tree1->Columns; Extreelib_tlb::IColumnPtr var_Column = var_Columns->Add(L"C0"); var_Column->ExpandColumns = L"1,2"; var_Column->DisplayExpandButton = false; var_Columns->Add(L"C1"); var_Columns->Add(L"C2"); var_Columns->Add(L"C3"); Extreelib_tlb::IColumnPtr var_Column1 = var_Columns->Add(L"C4"); var_Column1->ExpandColumns = L"5,6"; var_Column1->DisplayExpandButton = false; var_Columns->Add(L"C5"); Extreelib_tlb::IColumnPtr var_Column2 = var_Columns->Add(L"C6"); var_Column2->ExpandColumns = L"6,7"; var_Column2->DisplayExpandButton = false; var_Columns->Add(L"C7"); Tree1->EndUpdate(); |
552 |
Does your control support expandable header or columns, so I can arrange it on multiple levels
Tree1->BeginUpdate(); Tree1->DrawGridLines = Extreelib_tlb::GridLinesEnum::exAllLines; Tree1->BackColorLevelHeader = RGB(240,240,240); Extreelib_tlb::IColumnsPtr var_Columns = Tree1->Columns; Extreelib_tlb::IColumnPtr var_Column = var_Columns->Add(L"Photo"); var_Column->AllowSizing = false; var_Column->Width = 32; var_Columns->Add(L"Personal Info"); var_Columns->Add(L"Title"); var_Columns->Add(L"Name"); var_Columns->Add(L"First"); var_Columns->Add(L"Last"); var_Columns->Add(L"Address"); var_Columns->get_Item(TVariant("Personal Info"))->ExpandColumns = L"2,3"; Extreelib_tlb::IColumnPtr var_Column1 = var_Columns->get_Item(TVariant("Name")); var_Column1->ExpandColumns = L"4,5"; var_Column1->Expanded = false; Tree1->EndUpdate(); |
551 |
Does your control support subscript or superscript, in HTML captions
Tree1->ColumnAutoResize = false; Tree1->HeaderHeight = 28; Tree1->DefaultItemHeight = 24; Extreelib_tlb::IColumnsPtr var_Columns = Tree1->Columns; Extreelib_tlb::IColumnPtr var_Column = var_Columns->Add(L"Column 1"); var_Column->HTMLCaption = L"Column <b><off 2><font ;6>1"; var_Column->set_Def(Extreelib_tlb::DefColumnEnum::exCellCaptionFormat,TVariant(1)); Extreelib_tlb::IColumnPtr var_Column1 = var_Columns->Add(L"Column 2"); var_Column1->HTMLCaption = L"Column <b><off 2><font ;6>2"; var_Column1->set_Def(Extreelib_tlb::DefColumnEnum::exCellCaptionFormat,TVariant(1)); Extreelib_tlb::IColumnPtr var_Column2 = var_Columns->Add(L"Column 3"); var_Column2->HTMLCaption = L"Column <b><off 2><font ;6>3"; var_Column2->set_Def(Extreelib_tlb::DefColumnEnum::exCellCaptionFormat,TVariant(1)); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; long h = var_Items->AddItem(TVariant("Item <font ;6><off 4>1")); var_Items->set_CellCaption(TVariant(h),TVariant(1),TVariant("Item <font ;6><off -6>2")); var_Items->set_CellCaption(TVariant(h),TVariant(2),TVariant("Item <b><font ;6><off -6>2<off 4>3<off 4>1")); |
550 |
Is there any property I can save and restore automatically the current setting, column position, size, and so on (2)
Tree1->BeginUpdate(); Tree1->Columns->Add(L"Column"); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->AddItem(TVariant("Item 1")); var_Items->AddItem(TVariant("Item 2")); var_Items->AddItem(TVariant("Item 3")); Tree1->Layout = L"Select=\"0\";SingleSort=\"C0:2\";Columns=1"; Tree1->EndUpdate(); |
549 |
Is there any property I can save and restore automatically the current setting, column position, size, and so on (1)
Tree1->BeginUpdate(); Tree1->Columns->Add(L"Column"); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->AddItem(TVariant("Item 1")); var_Items->AddItem(TVariant("Item 2")); var_Items->AddItem(TVariant("Item 3")); Tree1->Layout = TVariant(String("gBjAAwAAuABmABpABsAB0ABlAByhoAPIAOEPAA9gYABoABQAgUEg0XN4AOcJicKkpujMbjsfkMFk0YhkQgUOjUEl8gjcGO0ok8KMULjEaGMcj08kQAO8oMkTNEtGwAG") + "QAqc7gUlhh1ABtAEsk9GpEfhElgVcsMupNlnlonlaAFcr0shUsp8QPEtnVJqJhmcIhUMh0QiU5sYAqMngUSuEMw07k8Qv0SgVRrNEuVflF2jF5x9JyNEm0TjQijemyE0" + "jE3t+YruauoAu4Az1qj9BzRn0UzksSnAA0xDjY6qnAw8OiUQ0dwzN0zWz2t7j8/xURAGNvWH6k8xlEhklhEI0O/6QAgI="); Tree1->EndUpdate(); |
548 |
I have noticed that the column's header is changed once the cursor hovers it. Is it possible to change that visual appearance
|
547 |
Is it possible to change the visual appearance of the columns selector/floating bar(3)
Tree1->ColumnAutoResize = false; Extreelib_tlb::IColumnsPtr var_Columns = Tree1->Columns; var_Columns->Add(L"Column 1"); var_Columns->Add(L"Column 2")->Visible = false; Tree1->VisualAppearance->Add(2,TVariant("c:\\exontrol\\images\\normal.ebn")); Tree1->VisualAppearance->Add(3,TVariant("c:\\exontrol\\images\\pushed.ebn")); Tree1->Background[Extreelib_tlb::BackgroundPartEnum::exColumnsFloatAppearance] = 0x2000000; Tree1->Background[Extreelib_tlb::BackgroundPartEnum::exColumnsFloatBackColor] = 0x3000000; Tree1->Background[Extreelib_tlb::BackgroundPartEnum::exColumnsFloatCaptionBackColor] = RGB(246,245,240); Tree1->ColumnsFloatBarVisible = Extreelib_tlb::ColumnsFloatBarVisibleEnum::exColumnsFloatBarVisibleIncludeHiddenColumns; |
546 |
Is it possible to change the visual appearance of the columns selector/floating bar(2)
Tree1->ColumnAutoResize = false; Extreelib_tlb::IColumnsPtr var_Columns = Tree1->Columns; var_Columns->Add(L"Column 1"); var_Columns->Add(L"Column 2")->Visible = false; Tree1->VisualAppearance->Add(3,TVariant("c:\\exontrol\\images\\pushed.ebn")); Tree1->Background[Extreelib_tlb::BackgroundPartEnum::exColumnsFloatBackColor] = 0x3000000; Tree1->ColumnsFloatBarVisible = Extreelib_tlb::ColumnsFloatBarVisibleEnum::exColumnsFloatBarVisibleIncludeHiddenColumns; |
545 |
Is it possible to change the visual appearance of the columns selector/floating bar(1)
Tree1->VisualAppearance->Add(2,TVariant("c:\\exontrol\\images\\normal.ebn")); Tree1->Background[Extreelib_tlb::BackgroundPartEnum::exColumnsFloatAppearance] = 0x2000000; Tree1->Background[Extreelib_tlb::BackgroundPartEnum::exColumnsFloatBackColor] = RGB(246,245,240); Tree1->Background[Extreelib_tlb::BackgroundPartEnum::exColumnsFloatCaptionBackColor] = RGB(246,245,240); Tree1->ColumnsFloatBarVisible = Extreelib_tlb::ColumnsFloatBarVisibleEnum::exColumnsFloatBarVisibleIncludeHiddenColumns; |
544 |
I am using the ColumnsFloatBarVisible property on True, but still not able to add any column on that list
|
543 |
Is it possible to list a column to columns selector/floating bar, but still user can use it
Tree1->ColumnAutoResize = false; Extreelib_tlb::IColumnsPtr var_Columns = Tree1->Columns; var_Columns->Add(L"Column 1"); var_Columns->Add(L"Column 2")->Visible = false; Extreelib_tlb::IColumnPtr var_Column = var_Columns->Add(L"Column 3"); var_Column->Visible = false; var_Column->Enabled = false; Tree1->ColumnsFloatBarVisible = Extreelib_tlb::ColumnsFloatBarVisibleEnum::exColumnsFloatBarVisibleIncludeHiddenColumns; |
542 |
How can I prevent a specific column not to be listed in the columns selector/floating bar
|
541 |
Is it possible to change the "Columns" caption being shown in the columns selector/floating bar
|
540 |
How can I show the columns selector, so the user can drag and drop columns to the view
|
539 |
The column's header is changed while the cursor hovers it. Is it possible to prevent that
|
538 |
Is there any public method to export the selected data
Tree1->BeginUpdate(); Tree1->MarkSearchColumn = false; Extreelib_tlb::IColumnsPtr var_Columns = Tree1->Columns; var_Columns->Add(L"C1"); var_Columns->Add(L"C2")->FormatColumn = L"1 index `A-Z`"; var_Columns->Add(L"C3")->FormatColumn = L"100 index ``"; Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->AddItem(TVariant("Item 1")); var_Items->set_SelectItem(var_Items->AddItem(TVariant("Item 2")),true); var_Items->AddItem(TVariant("Item 3")); Tree1->EndUpdate(); OutputDebugString( L"Export CSV Selected Items Only:" ); OutputDebugString( PChar(Tree1->Export(TVariant(""),TVariant("sel"))) ); |
537 |
Is it possible to auto-numbering the children items but still keeps the position after filtering
Tree1->BeginUpdate(); Tree1->LinesAtRoot = Extreelib_tlb::LinesAtRootEnum::exLinesAtRoot; Extreelib_tlb::IColumnPtr var_Column = Tree1->Columns->Add(L"Items"); var_Column->DisplayFilterButton = true; var_Column->FilterType = Extreelib_tlb::FilterTypeEnum::exFilter; var_Column->Filter = L"Child 2"; Extreelib_tlb::IColumnPtr var_Column1 = Tree1->Columns->Add(L"Pos.1"); var_Column1->FormatColumn = L"1 ropos ''"; var_Column1->Position = 0; var_Column1->Width = 32; var_Column1->AllowSizing = false; Extreelib_tlb::IColumnPtr var_Column2 = Tree1->Columns->Add(L"Pos.2"); var_Column2->FormatColumn = L"1 ropos ':'"; var_Column2->Position = 1; var_Column2->Width = 32; var_Column2->AllowSizing = false; Extreelib_tlb::IColumnPtr var_Column3 = Tree1->Columns->Add(L"Pos.3"); var_Column3->FormatColumn = L"1 ropos ':|A-Z'"; var_Column3->Position = 2; var_Column3->Width = 32; var_Column3->AllowSizing = false; Extreelib_tlb::IColumnPtr var_Column4 = Tree1->Columns->Add(L"Pos.4"); var_Column4->FormatColumn = L"1 ropos '|A-Z|'"; var_Column4->Position = 3; var_Column4->Width = 32; var_Column4->AllowSizing = false; Extreelib_tlb::IColumnPtr var_Column5 = Tree1->Columns->Add(L"Pos.5"); var_Column5->FormatColumn = L"'<font Tahoma;7>' + 1 ropos '-<b>||A-Z'"; var_Column5->set_Def(Extreelib_tlb::DefColumnEnum::exCellCaptionFormat,TVariant(1)); var_Column5->Position = 4; var_Column5->Width = 32; var_Column5->AllowSizing = false; Extreelib_tlb::IColumnPtr var_Column6 = Tree1->Columns->Add(L"Pos.6"); var_Column6->FormatColumn = L"'<b>'+ 1 ropos '</b>:<fgcolor=FF0000>|A-Z|'"; var_Column6->set_Def(Extreelib_tlb::DefColumnEnum::exCellCaptionFormat,TVariant(1)); var_Column6->Position = 5; var_Column6->Width = 48; var_Column6->AllowSizing = false; Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; long h = var_Items->AddItem(TVariant("Root 1")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 1")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 2")); var_Items->set_ExpandItem(h,true); h = var_Items->AddItem(TVariant("Root 2")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 1")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 2")); Tree1->ApplyFilter(); Tree1->EndUpdate(); |
536 |
Is it possible to auto-numbering the children items too
Tree1->BeginUpdate(); Tree1->LinesAtRoot = Extreelib_tlb::LinesAtRootEnum::exLinesAtRoot; Tree1->Columns->Add(L"Items"); Extreelib_tlb::IColumnPtr var_Column = Tree1->Columns->Add(L"Pos.1"); var_Column->FormatColumn = L"1 rpos ''"; var_Column->Position = 0; var_Column->Width = 32; var_Column->AllowSizing = false; Extreelib_tlb::IColumnPtr var_Column1 = Tree1->Columns->Add(L"Pos.2"); var_Column1->FormatColumn = L"1 rpos ':'"; var_Column1->Position = 1; var_Column1->Width = 32; var_Column1->AllowSizing = false; Extreelib_tlb::IColumnPtr var_Column2 = Tree1->Columns->Add(L"Pos.3"); var_Column2->FormatColumn = L"1 rpos ':|A-Z'"; var_Column2->Position = 2; var_Column2->Width = 32; var_Column2->AllowSizing = false; Extreelib_tlb::IColumnPtr var_Column3 = Tree1->Columns->Add(L"Pos.4"); var_Column3->FormatColumn = L"1 rpos '|A-Z|'"; var_Column3->Position = 3; var_Column3->Width = 32; var_Column3->AllowSizing = false; Extreelib_tlb::IColumnPtr var_Column4 = Tree1->Columns->Add(L"Pos.5"); var_Column4->FormatColumn = L"'<font Tahoma;7>' + 1 rpos '-<b>||A-Z'"; var_Column4->set_Def(Extreelib_tlb::DefColumnEnum::exCellCaptionFormat,TVariant(1)); var_Column4->Position = 4; var_Column4->Width = 32; var_Column4->AllowSizing = false; Extreelib_tlb::IColumnPtr var_Column5 = Tree1->Columns->Add(L"Pos.6"); var_Column5->FormatColumn = L"'<b>'+ 1 rpos '</b>:<fgcolor=FF0000>|A-Z|'"; var_Column5->set_Def(Extreelib_tlb::DefColumnEnum::exCellCaptionFormat,TVariant(1)); var_Column5->Position = 5; var_Column5->Width = 48; var_Column5->AllowSizing = false; Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; long h = var_Items->AddItem(TVariant("Root 1")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 1")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 2")); var_Items->set_ExpandItem(h,true); h = var_Items->AddItem(TVariant("Root 2")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 1")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 2")); Tree1->EndUpdate(); |
535 |
How can I find if there is any filter applied to the control
// FilterChange event - Notifies your application that the filter is changed. void __fastcall TForm1::Tree1FilterChange(TObject *Sender) { OutputDebugString( L"If negative, the filter is present, else not" ); OutputDebugString( PChar(Tree1->Items->VisibleItemCount) ); } Tree1->BeginUpdate(); Tree1->LinesAtRoot = Extreelib_tlb::LinesAtRootEnum::exLinesAtRoot; Tree1->TreeColumnIndex = -1; Tree1->FilterInclude = Extreelib_tlb::FilterIncludeEnum::exMatchingItemsOnly; Extreelib_tlb::IColumnPtr var_Column = Tree1->Columns->Add(L"Column"); var_Column->DisplayFilterButton = true; var_Column->FilterType = Extreelib_tlb::FilterTypeEnum::exFilter; var_Column->Filter = L"C1"; Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; long h = var_Items->AddItem(TVariant("R1")); var_Items->InsertItem(h,TNoParam(),TVariant("C1")); var_Items->InsertItem(h,TNoParam(),TVariant("C2")); var_Items->set_ExpandItem(h,true); h = var_Items->AddItem(TVariant("R2")); var_Items->InsertItem(h,TNoParam(),TVariant("C1")); var_Items->InsertItem(h,TNoParam(),TVariant("C2")); Tree1->ApplyFilter(); Tree1->EndUpdate(); |
534 |
How can I prevent showing the lines for the hierarchy while using the exMatchingItemsOnly option
Tree1->BeginUpdate(); Tree1->LinesAtRoot = Extreelib_tlb::LinesAtRootEnum::exLinesAtRoot; Tree1->TreeColumnIndex = -1; Tree1->FilterInclude = Extreelib_tlb::FilterIncludeEnum::exMatchingItemsOnly; Extreelib_tlb::IColumnPtr var_Column = Tree1->Columns->Add(L"Column"); var_Column->DisplayFilterButton = true; var_Column->FilterType = Extreelib_tlb::FilterTypeEnum::exFilter; var_Column->Filter = L"C1|C2"; Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; long h = var_Items->AddItem(TVariant("R1")); var_Items->InsertItem(h,TNoParam(),TVariant("C1")); var_Items->InsertItem(h,TNoParam(),TVariant("C2")); var_Items->set_ExpandItem(h,true); h = var_Items->AddItem(TVariant("R2")); var_Items->InsertItem(h,TNoParam(),TVariant("C1")); var_Items->InsertItem(h,TNoParam(),TVariant("C2")); Tree1->ApplyFilter(); Tree1->EndUpdate(); |
533 |
Is there any method to get only the matched items and not the items with his parent
Tree1->BeginUpdate(); Tree1->LinesAtRoot = Extreelib_tlb::LinesAtRootEnum::exLinesAtRoot; Tree1->FilterInclude = Extreelib_tlb::FilterIncludeEnum::exMatchingItemsOnly; Extreelib_tlb::IColumnPtr var_Column = Tree1->Columns->Add(L"Column"); var_Column->DisplayFilterButton = true; var_Column->FilterType = Extreelib_tlb::FilterTypeEnum::exFilter; var_Column->Filter = L"C1|C2"; Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; long h = var_Items->AddItem(TVariant("R1")); var_Items->InsertItem(h,TNoParam(),TVariant("C1")); var_Items->InsertItem(h,TNoParam(),TVariant("C2")); var_Items->set_ExpandItem(h,true); h = var_Items->AddItem(TVariant("R2")); var_Items->InsertItem(h,TNoParam(),TVariant("C1")); var_Items->InsertItem(h,TNoParam(),TVariant("C2")); Tree1->ApplyFilter(); Tree1->EndUpdate(); |
532 |
How can I add or change the padding (spaces) for captions in the control's header
Tree1->BeginUpdate(); Tree1->Columns->Add(L"Padding-Left")->set_Def(Extreelib_tlb::DefColumnEnum::exHeaderPaddingLeft,TVariant(18)); Extreelib_tlb::IColumnPtr var_Column = Tree1->Columns->Add(L"Padding-Right"); var_Column->set_Def(Extreelib_tlb::DefColumnEnum::exHeaderPaddingRight,TVariant(18)); var_Column->HeaderAlignment = Extreelib_tlb::AlignmentEnum::RightAlignment; Tree1->EndUpdate(); |
531 |
Do you have any plans to add cell spacing and cell padding to the cells
Tree1->BeginUpdate(); Tree1->DrawGridLines = Extreelib_tlb::GridLinesEnum::exRowLines; Extreelib_tlb::IColumnPtr var_Column = Tree1->Columns->Add(L"Padding-Left"); var_Column->set_Def(Extreelib_tlb::DefColumnEnum::exCellHasCheckBox,TVariant(true)); var_Column->set_Def(Extreelib_tlb::DefColumnEnum::exCellPaddingLeft,TVariant(18)); Tree1->Columns->Add(L"No-Padding")->set_Def(Extreelib_tlb::DefColumnEnum::exCellHasCheckBox,TVariant(true)); Tree1->Columns->Add(L"Empty")->Position = 0; Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->set_CellCaption(TVariant(var_Items->AddItem(TVariant("Item A.1"))),TVariant(1),TVariant("Item A.2")); var_Items->set_CellCaption(TVariant(var_Items->AddItem(TVariant("Item B.1"))),TVariant(1),TVariant("Item B.2")); var_Items->set_CellCaption(TVariant(var_Items->AddItem(TVariant("Item C.1"))),TVariant(1),TVariant("Item C.2")); Tree1->EndUpdate(); |
530 |
Is it possible display numbers in the same format no matter of regional settings in the control panel
Tree1->BeginUpdate(); Tree1->Columns->Add(L"Def")->set_Def(Extreelib_tlb::DefColumnEnum::exCellCaptionFormat,TVariant(1)); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; long h = var_Items->AddItem(TVariant(100000.27)); var_Items->set_FormatCell(TVariant(h),TVariant(0),L"(value format '') + ' <fgcolor=808080>(default positive)'"); h = var_Items->AddItem(TVariant(100000.27)); var_Items->set_FormatCell(TVariant(h),TVariant(0),L"(value format '2|.|3|,|1|1')"); h = var_Items->AddItem(TVariant(-100000.27)); var_Items->set_FormatCell(TVariant(h),TVariant(0),L"(value format '') + ' <fgcolor=808080>(default negative)'"); h = var_Items->AddItem(TVariant(-100000.27)); var_Items->set_FormatCell(TVariant(h),TVariant(0),L"(value format '2|.|3|,|1|1')"); Tree1->EndUpdate(); |
529 |
Is it possible to add a 0 for numbers less than 1 instead .7 to show 0.8
Tree1->BeginUpdate(); Tree1->Columns->Add(L"Def")->set_Def(Extreelib_tlb::DefColumnEnum::exCellCaptionFormat,TVariant(1)); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; long h = var_Items->AddItem(TVariant(0.27)); var_Items->set_FormatCell(TVariant(h),TVariant(0),L"(value format '') + ' <fgcolor=808080>(default)'"); h = var_Items->AddItem(TVariant(0.27)); var_Items->set_FormatCell(TVariant(h),TVariant(0),L"(value format '|||||0') + ' <fgcolor=808080>(Display no leading zeros)'"); Tree1->EndUpdate(); |
528 |
How can I specify the format for negative numbers
Tree1->BeginUpdate(); Tree1->Columns->Add(L"Def")->set_Def(Extreelib_tlb::DefColumnEnum::exCellCaptionFormat,TVariant(1)); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; long h = var_Items->AddItem(TVariant(-100000.27)); var_Items->set_FormatCell(TVariant(h),TVariant(0),L"(value format '') + ' <fgcolor=808080>(default)'"); h = var_Items->AddItem(TVariant(-100000.27)); var_Items->set_FormatCell(TVariant(h),TVariant(0),L"(value format '||||1') + ' <fgcolor=808080>(Negative sign, number; for example, -1.1)'"); Tree1->EndUpdate(); |
527 |
Is it possible to change the grouping character when display numbers
Tree1->BeginUpdate(); Tree1->Columns->Add(L"Def")->set_Def(Extreelib_tlb::DefColumnEnum::exCellCaptionFormat,TVariant(1)); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; long h = var_Items->AddItem(TVariant(100000.27)); var_Items->set_FormatCell(TVariant(h),TVariant(0),L"(value format '') + ' <fgcolor=808080>(default)'"); h = var_Items->AddItem(TVariant(100000.27)); var_Items->set_FormatCell(TVariant(h),TVariant(0),L"(value format '|||-') + ' <fgcolor=808080>(grouping character is -)'"); Tree1->EndUpdate(); |
526 |
How can I display numbers with 2 digits in each group
Tree1->BeginUpdate(); Tree1->Columns->Add(L"Def")->set_Def(Extreelib_tlb::DefColumnEnum::exCellCaptionFormat,TVariant(1)); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; long h = var_Items->AddItem(TVariant(100000.27)); var_Items->set_FormatCell(TVariant(h),TVariant(0),L"(value format '') + ' <fgcolor=808080>(default)'"); h = var_Items->AddItem(TVariant(100000.27)); var_Items->set_FormatCell(TVariant(h),TVariant(0),L"(value format '||2') + ' <fgcolor=808080>(grouping by 2 digits)'"); Tree1->EndUpdate(); |
525 |
How can I display my numbers using a different decimal separator
Tree1->BeginUpdate(); Tree1->Columns->Add(L"Def")->set_Def(Extreelib_tlb::DefColumnEnum::exCellCaptionFormat,TVariant(1)); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; long h = var_Items->AddItem(TVariant(100.27)); var_Items->set_FormatCell(TVariant(h),TVariant(0),L"(value format '') + ' <fgcolor=808080>(default)'"); h = var_Items->AddItem(TVariant(100.27)); var_Items->set_FormatCell(TVariant(h),TVariant(0),L"(value format '|;') + ' <fgcolor=808080>(decimal separator is <b>;</b>)'"); Tree1->EndUpdate(); |
524 |
Is it possible to display the numbers using 3 (three) digits
Tree1->BeginUpdate(); Tree1->Columns->Add(L"Def")->set_Def(Extreelib_tlb::DefColumnEnum::exCellCaptionFormat,TVariant(1)); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; long h = var_Items->AddItem(TVariant(100.27)); var_Items->set_FormatCell(TVariant(h),TVariant(0),L"(value format '') + ' <fgcolor=808080>(default)'"); h = var_Items->AddItem(TVariant(100.27)); var_Items->set_FormatCell(TVariant(h),TVariant(0),L"(value format '3') + ' <fgcolor=808080>(3 digits)'"); h = var_Items->AddItem(TVariant(100.27)); var_Items->set_FormatCell(TVariant(h),TVariant(0),L"(value format 2) + ' <fgcolor=808080>(2 digits)'"); h = var_Items->AddItem(TVariant(100.27)); var_Items->set_FormatCell(TVariant(h),TVariant(0),L"(value format 1) + ' <fgcolor=808080>(1 digit)'"); Tree1->EndUpdate(); |
523 |
Is it possible to format numbers
Tree1->BeginUpdate(); Tree1->MarkSearchColumn = false; Extreelib_tlb::IColumnsPtr var_Columns = Tree1->Columns; var_Columns->Add(L"Name"); Extreelib_tlb::IColumnPtr var_Column = var_Columns->Add(L"A"); var_Column->SortType = Extreelib_tlb::SortTypeEnum::SortNumeric; var_Column->AllowSizing = false; var_Column->Width = 36; var_Column->FormatColumn = L"len(value) ? value + ' +'"; Extreelib_tlb::IColumnPtr var_Column1 = var_Columns->Add(L"B"); var_Column1->SortType = Extreelib_tlb::SortTypeEnum::SortNumeric; var_Column1->AllowSizing = false; var_Column1->Width = 36; var_Column1->FormatColumn = L"len(value) ? value + ' +'"; Extreelib_tlb::IColumnPtr var_Column2 = var_Columns->Add(L"C"); var_Column2->SortType = Extreelib_tlb::SortTypeEnum::SortNumeric; var_Column2->AllowSizing = false; var_Column2->Width = 36; var_Column2->FormatColumn = L"len(value) ? value + ' ='"; Extreelib_tlb::IColumnPtr var_Column3 = var_Columns->Add(L"A+B+C"); var_Column3->SortType = Extreelib_tlb::SortTypeEnum::SortNumeric; var_Column3->Width = 64; var_Column3->ComputedField = L"dbl(%1)+dbl(%2)+dbl(%3)"; var_Column3->FormatColumn = TVariant(String("type(value) in (0,1) ? 'null' : ( dbl(value)<0 ? '<fgcolor=FF0000>'+ (value format '2|.|3|,|1' ) : (dbl(value)>0 ? '<fgcolor=00") + "00FF>+'+(value format '2|.|3|,' ): '0.00') )"); var_Column3->set_Def(Extreelib_tlb::DefColumnEnum::exCellCaptionFormat,TVariant(1)); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; long h = var_Items->AddItem(TVariant("Root")); var_Items->set_CellCaptionFormat(TVariant(h),TVariant(4),Extreelib_tlb::CaptionFormatEnum::exComputedField); long h1 = var_Items->InsertItem(h,TNoParam(),TVariant("Child 1")); var_Items->set_CellCaption(TVariant(h1),TVariant(1),TVariant(7)); var_Items->set_CellCaption(TVariant(h1),TVariant(2),TVariant(3)); var_Items->set_CellCaption(TVariant(h1),TVariant(3),TVariant(1)); h1 = var_Items->InsertItem(h,TNoParam(),TVariant("Child 2")); var_Items->set_CellCaption(TVariant(h1),TVariant(1),TVariant(-2)); var_Items->set_CellCaption(TVariant(h1),TVariant(2),TVariant(-2)); var_Items->set_CellCaption(TVariant(h1),TVariant(3),TVariant(-4)); h1 = var_Items->InsertItem(h,TNoParam(),TVariant("Child 3")); var_Items->set_CellCaption(TVariant(h1),TVariant(1),TVariant(2)); var_Items->set_CellCaption(TVariant(h1),TVariant(2),TVariant(2)); var_Items->set_CellCaption(TVariant(h1),TVariant(3),TVariant(-4)); var_Items->set_ExpandItem(h,true); Tree1->EndUpdate(); |
522 |
I am using the FormatColumn/FormatCell to format my columns. Is it possible to ignore the SelForeColor, so the foreground color for selected items does not override my settings
// SelectionChanged event - Fired after a new item has been selected. void __fastcall TForm1::Tree1SelectionChanged(TObject *Sender) { Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->ClearItemBackColor(0); var_Items->set_ItemBackColor(var_Items->get_SelectedItem(0),RGB(128,255,255)); } Tree1->BeginUpdate(); Tree1->MarkSearchColumn = false; Tree1->SelForeColor = Tree1->ForeColor; Tree1->SelBackColor = Tree1->BackColor; Tree1->ShowFocusRect = false; Extreelib_tlb::IColumnsPtr var_Columns = Tree1->Columns; Extreelib_tlb::IColumnPtr var_Column = var_Columns->Add(L"Format"); var_Column->FormatColumn = TVariant(String("type(value) in (0,1) ? 'null' : ( dbl(value)<0 ? '<fgcolor=FF0000>'+ (value format '2|.|3|,|1' ) : (dbl(value)>0 ? '<fgcolor=00") + "00FF>+'+(value format '2|.|3|,' ): '0.00') )"); var_Column->set_Def(Extreelib_tlb::DefColumnEnum::exCellCaptionFormat,TVariant(1)); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->AddItem(TVariant(10)); var_Items->AddItem(TVariant(-8)); Tree1->EndUpdate(); |
521 |
Is it possible to change the height for all items at once
Tree1->BeginUpdate(); Tree1->LinesAtRoot = Extreelib_tlb::LinesAtRootEnum::exLinesAtRoot; Tree1->Columns->Add(L"Items"); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; long h = var_Items->AddItem(TVariant("Root 1")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 1")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 2")); h = var_Items->AddItem(TVariant("Root 2")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 1")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 2")); var_Items->set_ExpandItem(0,true); Tree1->EndUpdate(); Tree1->DefaultItemHeight = 12; Tree1->Items->set_ItemHeight(0,12); |
520 |
How can I add a footer row
Tree1->ShowLockedItems = true; Tree1->DrawGridLines = Extreelib_tlb::GridLinesEnum::exVLines; Tree1->Columns->Add(L"C1"); Tree1->Columns->Add(L"C2"); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->set_LockedItemCount(Extreelib_tlb::VAlignmentEnum::BottomAlignment,1); long h = var_Items->get_LockedItem(Extreelib_tlb::VAlignmentEnum::BottomAlignment,0); var_Items->set_ItemBackColor(h,RGB(128,128,128)); var_Items->set_ItemForeColor(h,RGB(255,255,255)); var_Items->set_CellCaption(TVariant(h),TVariant(0),TVariant("footer c1")); var_Items->set_CellCaption(TVariant(h),TVariant(1),TVariant("footer c2")); var_Items->set_CellCaption(TVariant(var_Items->AddItem(TVariant("cell"))),TVariant(1),TVariant("cell")); |
519 |
How can I add a header row
Tree1->ShowLockedItems = true; Tree1->DrawGridLines = Extreelib_tlb::GridLinesEnum::exVLines; Tree1->Columns->Add(L"C1"); Tree1->Columns->Add(L"C2"); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->set_LockedItemCount(Extreelib_tlb::VAlignmentEnum::TopAlignment,1); long h = var_Items->get_LockedItem(Extreelib_tlb::VAlignmentEnum::TopAlignment,0); var_Items->set_ItemBackColor(h,RGB(128,128,128)); var_Items->set_ItemForeColor(h,RGB(255,255,255)); var_Items->set_CellCaption(TVariant(h),TVariant(0),TVariant("footer c1")); var_Items->set_CellCaption(TVariant(h),TVariant(1),TVariant("footer c2")); var_Items->set_CellCaption(TVariant(var_Items->AddItem(TVariant("cell"))),TVariant(1),TVariant("cell")); |
518 |
When I'm trying to show string with "line break" character (vbCrLF) in a textbox, it shows 2 squares. Is there any way to hide these squares
Extreelib_tlb::IColumnsPtr var_Columns = Tree1->Columns; var_Columns->Add(L"Value"); Extreelib_tlb::IColumnPtr var_Column = var_Columns->Add(L"CellSingleLine = False"); var_Column->ComputedField = L"%0"; var_Column->set_Def(Extreelib_tlb::DefColumnEnum::exCellSingleLine,TVariant(false)); Extreelib_tlb::IColumnPtr var_Column1 = var_Columns->Add(L"FormatColumn/replace CRLF"); var_Column1->ComputedField = L"%0"; var_Column1->FormatColumn = L"value replace `\\r\\n` with ``"; Extreelib_tlb::IColumnPtr var_Column2 = var_Columns->Add(L"FormatColumn/replace TAB,CRLF"); var_Column2->ComputedField = L"%0"; var_Column2->FormatColumn = L"(value replace `\\t` with ``) replace `\\r\\n` with ``"; Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->AddItem(TVariant("a\\ta\\r\\nb\\tb")); |
517 |
Is there any way to "unselect" radio group
// DblClick event - Occurs when the user dblclk the left mouse button over an object. void __fastcall TForm1::Tree1DblClick(TObject *Sender,short Shift,int X,int Y) { Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; long h = var_Items->get_CellChecked(1234); var_Items->set_CellHasCheckBox(TVariant(0),TVariant(h),true); var_Items->set_CellState(TVariant(0),TVariant(h),0); var_Items->set_CellHasCheckBox(TVariant(0),TVariant(h),false); } // SelectionChanged event - Fired after a new item has been selected. void __fastcall TForm1::Tree1SelectionChanged(TObject *Sender) { Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->set_CellState(TVariant(var_Items->FocusItem),TVariant(0),1); } Tree1->MarkSearchColumn = false; Tree1->SelBackColor = RGB(255,255,128); Tree1->SelForeColor = RGB(0,0,0); Tree1->Columns->Add(L"Default"); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; long h = var_Items->AddItem(TVariant("Radio 1")); var_Items->set_CellHasRadioButton(TVariant(h),TVariant(0),true); var_Items->set_CellRadioGroup(TVariant(h),TVariant(0),1234); h = var_Items->AddItem(TVariant("Radio 2")); var_Items->set_CellHasRadioButton(TVariant(h),TVariant(0),true); var_Items->set_CellRadioGroup(TVariant(h),TVariant(0),1234); var_Items->set_CellState(TVariant(h),TVariant(0),1); h = var_Items->AddItem(TVariant("Radio 3")); var_Items->set_CellHasRadioButton(TVariant(h),TVariant(0),true); var_Items->set_CellRadioGroup(TVariant(h),TVariant(0),1234); |
516 |
The Column.Alignment property does not seem to work for cells with images in them. What can be done
Tree1->BeginUpdate(); Tree1->Images(TVariant(String("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") + "lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" + "0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")); Tree1->TreeColumnIndex = -1; Tree1->DrawGridLines = Extreelib_tlb::GridLinesEnum::exAllLines; Tree1->HeaderHeight = 24; Tree1->MarkSearchColumn = false; Tree1->DefaultItemHeight = 24; Extreelib_tlb::IColumnPtr var_Column = Tree1->Columns->Add(L"Image"); var_Column->AllowSizing = false; var_Column->Width = 32; var_Column->HTMLCaption = L"<img>1</img>"; var_Column->HeaderAlignment = Extreelib_tlb::AlignmentEnum::CenterAlignment; var_Column->Alignment = Extreelib_tlb::AlignmentEnum::CenterAlignment; var_Column->set_Def(Extreelib_tlb::DefColumnEnum::exCellCaptionFormat,TVariant(1)); Tree1->Columns->Add(L"Rest"); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->AddItem(TVariant("<img>1</img>")); var_Items->AddItem(TVariant("<img>2</img>")); var_Items->AddItem(TVariant("<img>3</img>")); Tree1->EndUpdate(); |
515 |
Can I change the format of date to be shown in the control
Extreelib_tlb::IColumnsPtr var_Columns = Tree1->Columns; var_Columns->Add(L"Default"); Extreelib_tlb::IColumnPtr var_Column = var_Columns->Add(L"Format.1"); var_Column->ComputedField = L"%0"; var_Column->FormatColumn = L"dateF(value) replace `/` with `-`"; Extreelib_tlb::IColumnPtr var_Column1 = var_Columns->Add(L"Format.2"); var_Column1->ComputedField = L"%0"; var_Column1->set_Def(Extreelib_tlb::DefColumnEnum::exCellCaptionFormat,TVariant(1)); var_Column1->FormatColumn = L"`<b>`+ shortdate(value) + `</b> ` + timeF(value)"; Extreelib_tlb::IColumnPtr var_Column2 = var_Columns->Add(L"Format.3"); var_Column2->ComputedField = L"%0"; var_Column2->set_Def(Extreelib_tlb::DefColumnEnum::exCellCaptionFormat,TVariant(1)); var_Column2->FormatColumn = TVariant(String("( dateF(value) replace `/` with `-` ) + ` <b>`+ ( weekday(value) case ( 0 : `Su`; 1 : `Mo`; 2 : `Tu`; 3 : `We`; 4 : `Th`; 5 : `") + "Fr`; 6 : `Sa`) )"); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->AddItem(TVariant(TDateTime(2001,1,1,10,00,00,0).operator double())); var_Items->AddItem(TVariant(TDateTime(2001,1,2,10,00,00,0).operator double())); |
514 |
Is it possible to scroll the control's content by clicking and dragging
Tree1->BeginUpdate(); Tree1->ColumnAutoResize = false; Tree1->ContinueColumnScroll = false; /* Select the Component\Import Component...\Import a Type Library, to import the following Type Library: Microsoft ActiveX Data Objects 6.1 Library TypeLib: msado15.dll to define the namespace: Adodb_tlb */ //#include "ADODB_TLB.h" Adodb_tlb::_RecordsetPtr rs = Variant::CreateObject(L"ADOR.Recordset"); rs->Open(TVariant("Orders"),TVariant("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExTree\\Sample\\Access\\sample.mdb"),Adodb_tlb::CursorTypeEnum::adOpenStatic,Adodb_tlb::LockTypeEnum::adLockOptimistic,0); Tree1->DataSource = (IDispatch*)rs; Tree1->AutoDrag = Extreelib_tlb::AutoDragEnum::exAutoDragScroll; Tree1->EndUpdate(); |
513 |
How can copy and paste the selection to Microsoft Word, any OLE compliant application, as a snapshot
Tree1->BeginUpdate(); Tree1->VisualAppearance->Add(1,TVariant("c:\\exontrol\\images\\normal.ebn")); Tree1->HTMLPicture[L"p1"] = TVariant("c:\\exontrol\\images\\card.png"); Tree1->HTMLPicture[L"p2"] = TVariant("c:\\exontrol\\images\\sun.png"); Tree1->AutoDrag = Extreelib_tlb::AutoDragEnum::exAutoDragCopySnapShot; Tree1->LinesAtRoot = Extreelib_tlb::LinesAtRootEnum::exNoLinesAtRoot; Tree1->HasLines = Extreelib_tlb::HierarchyLineEnum::exThinLine; Tree1->ShowFocusRect = false; Tree1->DefaultItemHeight = 26; Tree1->Columns->Add(L"Task"); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; long h = var_Items->AddItem(TVariant("<img>p1:32</img>Group 1")); var_Items->set_CellCaptionFormat(TVariant(h),TVariant(0),Extreelib_tlb::CaptionFormatEnum::exHTML); var_Items->set_ItemDivider(h,0); var_Items->set_ItemBold(h,true); long h1 = var_Items->InsertItem(h,TNoParam(),TVariant("Task 1")); long h2 = var_Items->InsertItem(h,TNoParam(),TVariant("Task 2")); long h3 = var_Items->InsertItem(h,TNoParam(),TVariant("Task 3")); h = var_Items->AddItem(TVariant("<img>p2:32</img>Group 2")); var_Items->set_CellCaptionFormat(TVariant(h),TVariant(0),Extreelib_tlb::CaptionFormatEnum::exHTML); var_Items->set_ItemBold(h,true); var_Items->set_ItemDivider(h,0); h1 = var_Items->InsertItem(h,TNoParam(),TVariant("Task")); var_Items->set_ExpandItem(0,true); Tree1->EndUpdate(); |
512 |
How can copy and paste the selection to Microsoft Word, any OLE compliant application, as a image
Tree1->BeginUpdate(); Tree1->HTMLPicture[L"p1"] = TVariant("c:\\exontrol\\images\\card.png"); Tree1->HTMLPicture[L"p2"] = TVariant("c:\\exontrol\\images\\sun.png"); TVariant var_HTMLPicture = TVariant(Tree1->HTMLPicture[L"aka1"]); Tree1->HeaderHeight = 24; Tree1->DefaultItemHeight = 48; Tree1->DrawGridLines = Extreelib_tlb::GridLinesEnum::exRowLines; Tree1->GridLineColor = RGB(240,240,240); Tree1->SelBackMode = Extreelib_tlb::BackModeEnum::exTransparent; Tree1->ColumnAutoResize = false; Tree1->ContinueColumnScroll = false; /* Select the Component\Import Component...\Import a Type Library, to import the following Type Library: Microsoft ActiveX Data Objects 6.1 Library TypeLib: msado15.dll to define the namespace: Adodb_tlb */ //#include "ADODB_TLB.h" Adodb_tlb::_RecordsetPtr rs = Variant::CreateObject(L"ADOR.Recordset"); rs->Open(TVariant("Orders"),TVariant("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExTree\\Sample\\Access\\sample.mdb"),Adodb_tlb::CursorTypeEnum::adOpenStatic,Adodb_tlb::LockTypeEnum::adLockOptimistic,0); Tree1->DataSource = (IDispatch*)rs; Tree1->Columns->get_Item(TVariant(0))->set_Def(Extreelib_tlb::DefColumnEnum::exCellCaptionFormat,TVariant(1)); Tree1->Columns->get_Item(TVariant(0))->FormatColumn = L"value + ` <img>p` + (1 + (value mod 3 ) ) + `</img>`"; Tree1->Columns->get_Item(TVariant(0))->Width = 112; Tree1->Columns->get_Item(TVariant(1))->set_Def(Extreelib_tlb::DefColumnEnum::exCellHasCheckBox,TVariant(1)); Tree1->Columns->get_Item(TVariant(2))->set_LevelKey(TVariant("1")); Tree1->Columns->get_Item(TVariant(3))->set_LevelKey(TVariant("1")); Tree1->Columns->get_Item(TVariant(4))->set_LevelKey(TVariant("1")); Tree1->AutoDrag = Extreelib_tlb::AutoDragEnum::exAutoDragCopyImage; Tree1->SingleSel = false; Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; long h = var_Items->get_ItemByIndex(1); var_Items->set_SelectItem(h,true); h = var_Items->get_ItemByIndex(2); var_Items->set_SelectItem(h,true); h = var_Items->get_ItemByIndex(3); var_Items->set_SelectItem(h,true); var_Items->set_LockedItemCount(Extreelib_tlb::VAlignmentEnum::BottomAlignment,1); h = var_Items->get_LockedItem(Extreelib_tlb::VAlignmentEnum::BottomAlignment,0); var_Items->set_CellCaption(TVariant(h),TVariant(1),TVariant("<font ;16>Click the selection and <b>wait to start dragging</b>, and then drop to Microsoft Word, ...")); var_Items->set_CellSingleLine(TVariant(h),TVariant(1),Extreelib_tlb::CellSingleLineEnum::exCaptionWordWrap); var_Items->set_CellCaptionFormat(TVariant(h),TVariant(1),Extreelib_tlb::CaptionFormatEnum::exHTML); var_Items->set_CellHAlignment(TVariant(h),TVariant(1),Extreelib_tlb::AlignmentEnum::CenterAlignment); var_Items->set_ItemDivider(h,1); var_Items->set_ItemDividerLineAlignment(h,Extreelib_tlb::DividerAlignmentEnum::DividerTop); Tree1->EndUpdate(); |
511 |
How can copy and paste the selection to Microsoft Word, Excel or any OLE compliant application, as a text
Tree1->BeginUpdate(); Tree1->ColumnAutoResize = false; Tree1->ContinueColumnScroll = false; /* Select the Component\Import Component...\Import a Type Library, to import the following Type Library: Microsoft ActiveX Data Objects 6.1 Library TypeLib: msado15.dll to define the namespace: Adodb_tlb */ //#include "ADODB_TLB.h" Adodb_tlb::_RecordsetPtr rs = Variant::CreateObject(L"ADOR.Recordset"); rs->Open(TVariant("Orders"),TVariant("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExTree\\Sample\\Access\\sample.mdb"),Adodb_tlb::CursorTypeEnum::adOpenStatic,Adodb_tlb::LockTypeEnum::adLockOptimistic,0); Tree1->DataSource = (IDispatch*)rs; Tree1->Columns->get_Item(TVariant(2))->set_LevelKey(TVariant("1")); Tree1->Columns->get_Item(TVariant(3))->set_LevelKey(TVariant("1")); Tree1->Columns->get_Item(TVariant(4))->set_LevelKey(TVariant("1")); Tree1->AutoDrag = Extreelib_tlb::AutoDragEnum::exAutoDragCopyText; Tree1->SingleSel = false; Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; long h = var_Items->get_ItemByIndex(1); var_Items->set_SelectItem(h,true); h = var_Items->get_ItemByIndex(3); var_Items->set_SelectItem(h,true); h = var_Items->get_ItemByIndex(4); var_Items->set_SelectItem(h,true); h = var_Items->get_ItemByIndex(5); var_Items->set_SelectItem(h,true); var_Items->set_LockedItemCount(Extreelib_tlb::VAlignmentEnum::BottomAlignment,1); h = var_Items->get_LockedItem(Extreelib_tlb::VAlignmentEnum::BottomAlignment,0); var_Items->set_CellCaption(TVariant(h),TVariant(0),TVariant("<font ;16>Click the selection and <b>wait to start dragging</b>, and then drop to Microsoft Word, Excel, ...")); var_Items->set_CellSingleLine(TVariant(h),TVariant(0),Extreelib_tlb::CellSingleLineEnum::exCaptionWordWrap); var_Items->set_CellCaptionFormat(TVariant(h),TVariant(0),Extreelib_tlb::CaptionFormatEnum::exHTML); var_Items->set_CellHAlignment(TVariant(h),TVariant(0),Extreelib_tlb::AlignmentEnum::CenterAlignment); var_Items->set_ItemDivider(h,0); var_Items->set_ItemDividerLineAlignment(h,Extreelib_tlb::DividerAlignmentEnum::DividerTop); Tree1->EndUpdate(); |
510 |
Is it possible to change the indentation during the drag and drop
Tree1->BeginUpdate(); Tree1->VisualAppearance->Add(1,TVariant("c:\\exontrol\\images\\normal.ebn")); Tree1->AutoDrag = Extreelib_tlb::AutoDragEnum::exAutoDragPositionAny; Tree1->LinesAtRoot = Extreelib_tlb::LinesAtRootEnum::exNoLinesAtRoot; Tree1->HasLines = Extreelib_tlb::HierarchyLineEnum::exSolidLine; Tree1->HasButtons = Extreelib_tlb::ExpandButtonEnum::exWPlus; Tree1->ShowFocusRect = false; Tree1->SelBackMode = Extreelib_tlb::BackModeEnum::exTransparent; Tree1->Columns->Add(L"Task"); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; long h = var_Items->AddItem(TVariant("Group 1")); var_Items->set_ItemBold(h,true); var_Items->set_ItemDivider(h,0); long h1 = var_Items->InsertItem(h,TNoParam(),TVariant("Task 1")); long h2 = var_Items->InsertItem(h1,TNoParam(),TVariant("Task 2")); h2 = var_Items->InsertItem(h1,TNoParam(),TVariant("Task 3")); long h3 = var_Items->InsertItem(h,TNoParam(),TVariant("Task 3")); var_Items->set_ExpandItem(h,true); var_Items->set_ExpandItem(h1,true); h = var_Items->AddItem(TVariant("Group 2")); var_Items->set_ItemBold(h,true); var_Items->set_ItemDivider(h,0); var_Items->set_LockedItemCount(Extreelib_tlb::VAlignmentEnum::BottomAlignment,1); h = var_Items->get_LockedItem(Extreelib_tlb::VAlignmentEnum::BottomAlignment,0); var_Items->set_CellCaption(TVariant(h),TVariant(0),TVariant(String("Click a row, and move by dragging <b>up, down</b> to change the row's parent or <b>left,right</b> to increase or decrease the i") + "ndentation.")); var_Items->set_CellSingleLine(TVariant(h),TVariant(0),Extreelib_tlb::CellSingleLineEnum::exCaptionWordWrap); var_Items->set_CellCaptionFormat(TVariant(h),TVariant(0),Extreelib_tlb::CaptionFormatEnum::exHTML); Tree1->EndUpdate(); |
509 |
Is it possible to allow moving an item to another, but keeping its indentation
Tree1->BeginUpdate(); Tree1->VisualAppearance->Add(1,TVariant("c:\\exontrol\\images\\normal.ebn")); Tree1->AutoDrag = Extreelib_tlb::AutoDragEnum::exAutoDragPositionKeepIndent; Tree1->LinesAtRoot = Extreelib_tlb::LinesAtRootEnum::exNoLinesAtRoot; Tree1->HasLines = Extreelib_tlb::HierarchyLineEnum::exThinLine; Tree1->ShowFocusRect = false; Tree1->Columns->Add(L"Task"); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; long h = var_Items->AddItem(TVariant("Group 1")); var_Items->set_ItemDivider(h,0); var_Items->set_ItemBold(h,true); long h1 = var_Items->InsertItem(h,TNoParam(),TVariant("Task 1")); long h2 = var_Items->InsertItem(h,TNoParam(),TVariant("Task 2")); long h3 = var_Items->InsertItem(h,TNoParam(),TVariant("Task 3")); var_Items->set_ExpandItem(h,true); h = var_Items->AddItem(TVariant("Group 2")); var_Items->set_ItemBold(h,true); var_Items->set_ItemDivider(h,0); Tree1->EndUpdate(); |
508 |
How can I change the row's position to another, by drag and drop. Is it possible
Tree1->BeginUpdate(); Tree1->ShowFocusRect = false; Tree1->VisualAppearance->Add(1,TVariant("c:\\exontrol\\images\\normal.ebn")); Tree1->AutoDrag = Extreelib_tlb::AutoDragEnum::exAutoDragPosition; Tree1->Columns->Add(L"Task"); Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->AddItem(TVariant("Task 1")); var_Items->AddItem(TVariant("Task 2")); var_Items->AddItem(TVariant("Task 3")); var_Items->AddItem(TVariant("Task 4")); Tree1->EndUpdate(); |
507 |
How do I enable the scrollbar-extension, as thumb to be shown outside of the control's client area
Tree1->BeginUpdate(); Tree1->ScrollBars = Extreelib_tlb::ScrollBarsEnum::exDisableBoth; Tree1->ScrollPartVisible[Extreelib_tlb::ScrollBarEnum::exVScroll,Extreelib_tlb::ScrollPartEnum::exExtentThumbPart] = true; Tree1->ScrollPartVisible[Extreelib_tlb::ScrollBarEnum::exHScroll,Extreelib_tlb::ScrollPartEnum::exExtentThumbPart] = true; Tree1->ScrollPartVisible[Extreelib_tlb::ScrollBarEnum(0x2),Extreelib_tlb::ScrollPartEnum::exExtentThumbPart] = true; Tree1->ScrollWidth = 4; Tree1->Background[Extreelib_tlb::BackgroundPartEnum::exVSBack] = RGB(240,240,240); Tree1->Background[Extreelib_tlb::BackgroundPartEnum::exVSThumb] = RGB(128,128,128); Tree1->ScrollHeight = 4; Tree1->Background[Extreelib_tlb::BackgroundPartEnum::exHSBack] = Tree1->Background[Extreelib_tlb::BackgroundPartEnum::exVSBack]; Tree1->Background[Extreelib_tlb::BackgroundPartEnum::exHSThumb] = Tree1->Background[Extreelib_tlb::BackgroundPartEnum::exVSThumb]; Tree1->Background[Extreelib_tlb::BackgroundPartEnum::exScrollSizeGrip] = Tree1->Background[Extreelib_tlb::BackgroundPartEnum::exVSBack]; Tree1->EndUpdate(); |
506 |
How can I have a case-insensitive filter (exFilterDoCaseSensitive flag is not set)
Tree1->BeginUpdate(); Tree1->MarkSearchColumn = false; Extreelib_tlb::IColumnsPtr var_Columns = Tree1->Columns; Extreelib_tlb::IColumnPtr var_Column = var_Columns->Add(L"Car"); var_Column->DisplayFilterButton = true; var_Column->FilterType = Extreelib_tlb::FilterTypeEnum::exFilter; var_Column->Filter = L"MAZDA"; Extreelib_tlb::IColumnPtr var_Column1 = var_Columns->Add(L"Equipment"); var_Column1->DisplayFilterButton = true; var_Column1->DisplayFilterPattern = false; var_Column1->CustomFilter = L"Air Bag||*Air Bag*|||Air condition||*Air condition*|||ABS||*ABS*|||ESP||*ESP*"; var_Column1->FilterType = Extreelib_tlb::FilterTypeEnum::exPattern; var_Column1->Filter = L"AIR BAG"; Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->set_CellCaption(TVariant(var_Items->AddItem(TVariant("Mazda"))),TVariant(1),TVariant("Air Bag")); var_Items->set_CellCaption(TVariant(var_Items->AddItem(TVariant("Toyota"))),TVariant(1),TVariant("Air Bag,Air condition")); var_Items->set_CellCaption(TVariant(var_Items->AddItem(TVariant("Ford"))),TVariant(1),TVariant("Air condition")); var_Items->set_CellCaption(TVariant(var_Items->AddItem(TVariant("Nissan"))),TVariant(1),TVariant("Air Bag,ABS,ESP")); var_Items->set_CellCaption(TVariant(var_Items->AddItem(TVariant("Mazda"))),TVariant(1),TVariant("Air Bag, ABS,ESP")); var_Items->set_CellCaption(TVariant(var_Items->AddItem(TVariant("Mazda"))),TVariant(1),TVariant("ABS,ESP")); Tree1->ApplyFilter(); Tree1->EndUpdate(); |
505 |
How can I have a case-sensitive filter
Tree1->BeginUpdate(); Tree1->MarkSearchColumn = false; Extreelib_tlb::IColumnsPtr var_Columns = Tree1->Columns; Extreelib_tlb::IColumnPtr var_Column = var_Columns->Add(L"Car"); var_Column->DisplayFilterButton = true; var_Column->FilterType = Extreelib_tlb::FilterTypeEnum::exFilterDoCaseSensitive | Extreelib_tlb::FilterTypeEnum::exFilter; var_Column->Filter = L"Mazda"; Extreelib_tlb::IColumnPtr var_Column1 = var_Columns->Add(L"Equipment"); var_Column1->DisplayFilterButton = true; var_Column1->DisplayFilterPattern = false; var_Column1->CustomFilter = L"Air Bag||*Air Bag*|||Air condition||*Air condition*|||ABS||*ABS*|||ESP||*ESP*"; var_Column1->FilterType = Extreelib_tlb::FilterTypeEnum::exFilterDoCaseSensitive | Extreelib_tlb::FilterTypeEnum::exPattern; var_Column1->Filter = L"Air Bag"; Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->set_CellCaption(TVariant(var_Items->AddItem(TVariant("Mazda"))),TVariant(1),TVariant("Air Bag")); var_Items->set_CellCaption(TVariant(var_Items->AddItem(TVariant("Toyota"))),TVariant(1),TVariant("Air Bag,Air condition")); var_Items->set_CellCaption(TVariant(var_Items->AddItem(TVariant("Ford"))),TVariant(1),TVariant("Air condition")); var_Items->set_CellCaption(TVariant(var_Items->AddItem(TVariant("Nissan"))),TVariant(1),TVariant("Air Bag,ABS,ESP")); var_Items->set_CellCaption(TVariant(var_Items->AddItem(TVariant("Mazda"))),TVariant(1),TVariant("Air Bag, ABS,ESP")); var_Items->set_CellCaption(TVariant(var_Items->AddItem(TVariant("Mazda"))),TVariant(1),TVariant("ABS,ESP")); Tree1->ApplyFilter(); Tree1->EndUpdate(); |
504 |
I have several columns, but noticed that the filter is using AND between columns, but I need OR clause for filtering. Is it possible
Tree1->BeginUpdate(); Tree1->LinesAtRoot = Extreelib_tlb::LinesAtRootEnum::exLinesAtRoot; Extreelib_tlb::IColumnPtr var_Column = Tree1->Columns->Add(L"Item"); var_Column->DisplayFilterButton = true; var_Column->DisplayFilterPattern = false; var_Column->Filter = L"Child 1"; var_Column->FilterType = Extreelib_tlb::FilterTypeEnum::exFilter; Extreelib_tlb::IColumnPtr var_Column1 = Tree1->Columns->Add(L"Date"); var_Column1->DisplayFilterButton = true; var_Column1->DisplayFilterPattern = false; var_Column1->DisplayFilterDate = true; var_Column1->FilterList = Extreelib_tlb::FilterListEnum::exShowExclude | Extreelib_tlb::FilterListEnum::exShowFocusItem | Extreelib_tlb::FilterListEnum::exShowCheckBox | Extreelib_tlb::FilterListEnum::exNoItems; var_Column1->Filter = L"TDateTime(2010,12,28).operator double()"; var_Column1->FilterType = Extreelib_tlb::FilterTypeEnum::exDate; Tree1->FilterCriteria = L"%0 or %1"; Tree1->Description[Extreelib_tlb::DescriptionTypeEnum::exFilterBarOr] = L"<font ;18><fgcolor=FF0000>or</fgcolor></font>"; Tree1->Description[Extreelib_tlb::DescriptionTypeEnum::exFilterBarAnd] = L"<font ;18><fgcolor=FF0000>and</fgcolor></font>"; Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; long h = var_Items->AddItem(TVariant("Root 1")); var_Items->set_CellCaption(TVariant(var_Items->InsertItem(h,TNoParam(),TVariant("Child 1"))),TVariant(1),TVariant(TDateTime(2010,12,27).operator double())); var_Items->set_CellCaption(TVariant(var_Items->InsertItem(h,TNoParam(),TVariant("Child 2"))),TVariant(1),TVariant(TDateTime(2010,12,28).operator double())); var_Items->set_ExpandItem(h,true); h = var_Items->AddItem(TVariant("Root 2")); var_Items->set_CellCaption(TVariant(var_Items->InsertItem(h,TNoParam(),TVariant("Child 1"))),TVariant(1),TVariant(TDateTime(2010,12,29).operator double())); var_Items->set_CellCaption(TVariant(var_Items->InsertItem(h,TNoParam(),TVariant("Child 2"))),TVariant(1),TVariant(TDateTime(2010,12,30).operator double())); Tree1->ApplyFilter(); Tree1->EndUpdate(); |
503 |
Is it possible exclude the dates being selected in the drop down filter window
Tree1->BeginUpdate(); Extreelib_tlb::IColumnPtr var_Column = Tree1->Columns->Add(L"Date"); var_Column->SortType = Extreelib_tlb::SortTypeEnum::SortDate; var_Column->DisplayFilterButton = true; var_Column->DisplayFilterPattern = false; var_Column->DisplayFilterDate = true; var_Column->FilterList = Extreelib_tlb::FilterListEnum::exShowExclude | Extreelib_tlb::FilterListEnum::exShowFocusItem | Extreelib_tlb::FilterListEnum::exShowCheckBox | Extreelib_tlb::FilterListEnum::exNoItems; Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->AddItem(TVariant(TDateTime(2010,12,27).operator double())); var_Items->AddItem(TVariant(TDateTime(2010,12,28).operator double())); var_Items->AddItem(TVariant(TDateTime(2010,12,29).operator double())); var_Items->AddItem(TVariant(TDateTime(2010,12,30).operator double())); var_Items->AddItem(TVariant(TDateTime(2010,12,31).operator double())); Tree1->EndUpdate(); |
502 |
How can I display a calendar control inside the drop down filter window
Tree1->BeginUpdate(); Extreelib_tlb::IColumnPtr var_Column = Tree1->Columns->Add(L"Date"); var_Column->SortType = Extreelib_tlb::SortTypeEnum::SortDate; var_Column->DisplayFilterButton = true; var_Column->DisplayFilterPattern = false; var_Column->DisplayFilterDate = true; var_Column->FilterList = Extreelib_tlb::FilterListEnum::exShowFocusItem | Extreelib_tlb::FilterListEnum::exShowCheckBox | Extreelib_tlb::FilterListEnum::exNoItems; Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->AddItem(TVariant(TDateTime(2010,12,27).operator double())); var_Items->AddItem(TVariant(TDateTime(2010,12,28).operator double())); var_Items->AddItem(TVariant(TDateTime(2010,12,29).operator double())); var_Items->AddItem(TVariant(TDateTime(2010,12,30).operator double())); var_Items->AddItem(TVariant(TDateTime(2010,12,31).operator double())); Tree1->EndUpdate(); |
501 |
Is it possible to include the dates as checkb-boxes in the drop down filter window
Tree1->BeginUpdate(); Extreelib_tlb::IColumnPtr var_Column = Tree1->Columns->Add(L"Dates"); var_Column->SortType = Extreelib_tlb::SortTypeEnum::SortDate; var_Column->DisplayFilterButton = true; var_Column->DisplayFilterPattern = true; var_Column->DisplayFilterDate = true; var_Column->FilterList = Extreelib_tlb::FilterListEnum::exShowFocusItem | Extreelib_tlb::FilterListEnum::exShowCheckBox; var_Column->Filter = L"to 12/27/2010"; var_Column->FilterType = Extreelib_tlb::FilterTypeEnum::exDate; Extreelib_tlb::IItemsPtr var_Items = Tree1->Items; var_Items->AddItem(TVariant(TDateTime(2010,12,27).operator double())); var_Items->AddItem(TVariant(TDateTime(2010,12,28).operator double())); var_Items->AddItem(TVariant(TDateTime(2010,12,29).operator double())); var_Items->AddItem(TVariant(TDateTime(2010,12,30).operator double())); var_Items->AddItem(TVariant(TDateTime(2010,12,31).operator double())); Tree1->ApplyFilter(); Tree1->EndUpdate(); |